View difference between Paste ID: LwNaKrFK and JywPjVFW
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
    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__) */