Working YellowNotes on Windows.
This commit is contained in:
31
tr.h
Normal file
31
tr.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef TR_H
|
||||
#define TR_H
|
||||
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
typedef std::unordered_map<std::string, std::string> Translations_t;
|
||||
|
||||
class tr
|
||||
{
|
||||
private:
|
||||
std::unordered_map<std::string, Translations_t *> _translations;
|
||||
std::string _lang;
|
||||
|
||||
private:
|
||||
void add(const char *sentence, ...);
|
||||
|
||||
public:
|
||||
const char *translate(const char *str);
|
||||
|
||||
public:
|
||||
void setLang(const std::string &l);
|
||||
|
||||
public:
|
||||
tr();
|
||||
};
|
||||
|
||||
const char *_(const char *str);
|
||||
void setLang(const std::string &lang);
|
||||
|
||||
#endif // TR_H
|
||||
Reference in New Issue
Block a user