Advertisement
Guest User

Localized.h

a guest
Mar 25th, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. //
  2. //  Localized.h
  3. //  astroGems
  4. //
  5. //  Created by Alex Gievsky on 30.10.13.
  6. //
  7. //
  8.  
  9. #ifndef __astroGems__Localized__
  10. #define __astroGems__Localized__
  11.  
  12. #include <map>
  13. #include <string>
  14.  
  15. #include "cocos2d.h"
  16.  
  17. #define kLocalizedStringNotFound "notFound"
  18.  
  19. USING_NS_CC;
  20.  
  21. using namespace std;
  22.  
  23. class Localized {
  24.     typedef map<string, string> StringStringMap;
  25. private:
  26.     virtual ~Localized();
  27.     Localized();
  28. public:
  29.     static string getString(const string &key);
  30.     static void purge();
  31.    
  32.     static void load();
  33.    
  34.     static string languageShortNameForType(LanguageType type);
  35.     static LanguageType getPreviousAvailableLanguage();
  36.     static LanguageType getNextAvailableLanguage();
  37.    
  38.     static bool isLanguageSupported(LanguageType language);
  39. private:
  40.     StringStringMap strings;
  41.     static Localized *__sharedInstance;
  42. };
  43.  
  44. #endif /* defined(__astroGems__Localized__) */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement