SHARE
TWEET

Localized.h

a guest Mar 25th, 2014 368 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     static void load();
  32.    
  33.     static string languageShortNameForType(LanguageType type);    
  34.     static bool isLanguageSupported(LanguageType language);
  35. private:
  36.     StringStringMap strings;
  37.     static Localized *__sharedInstance;
  38. };
  39.  
  40. #endif /* defined(__astroGems__Localized__) */
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top