SHOW:
|
|
- or go back to the newest paste.
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 | private: | |
34 | - | static string languageShortNameForType(LanguageType type); |
34 | + | |
35 | - | static LanguageType getPreviousAvailableLanguage(); |
35 | + | |
36 | - | static LanguageType getNextAvailableLanguage(); |
36 | + | |
37 | ||
38 | - | static bool isLanguageSupported(LanguageType language); |
38 | + |