Erwan
- Added translation mechanism, and basic french translation as an example
This commit is contained in:
23
projects/mtg/include/Translate.h
Normal file
23
projects/mtg/include/Translate.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _TRANSLATE_H_
|
||||
#define _TRANSLATE_H_
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Translator{
|
||||
protected:
|
||||
static Translator * mInstance;
|
||||
public:
|
||||
map<string,string> values;
|
||||
string translate(string toTranslate);
|
||||
Translator();
|
||||
int Add(string from, string to);
|
||||
static Translator * GetInstance();
|
||||
static void EndInstance();
|
||||
};
|
||||
|
||||
string _(string toTranslate);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user