-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLocalizedString.h
44 lines (29 loc) · 1001 Bytes
/
LocalizedString.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/****************************************************************************
LocalizedString.h
Extension for Axmol Engine: localize your strings to several languages
Inspired by the "Multiple language support" tutorial by Den.
https://discuss.cocos2d-x.org/t/tutorial-multiple-language-support/16237
Created by Daniel Alias on 2024/02/11 (yyyy/mm/dd) under MIT Licence
****************************************************************************/
#ifndef LOCALIZEDSTRINGTEST_LOCALIZEDSTRING_H
#define LOCALIZEDSTRINGTEST_LOCALIZEDSTRING_H
#ifndef _LocalizedString_H_
#define _LocalizedString_H_
#include "axmol.h"
#include "rapidjson/document.h"
using std::string;
USING_NS_AX;;
class LocalizedString
{
private:
LocalizedString();
~LocalizedString();
string extension;
string fullContent;
ValueMap readMap;
public:
static LocalizedString* getInstance();
string getLocalizedString(std::string key);
};
#endif
#endif //LOCALIZEDSTRINGTEST_LOCALIZEDSTRING_H