-
Notifications
You must be signed in to change notification settings - Fork 6
/
LauGettext.h
45 lines (30 loc) · 1.1 KB
/
LauGettext.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
45
#ifndef Gettext_LauGettext_H
#define Gettext_LauGettext_H
#include "MoParser.h"
class LauGettext {
public:
static LauGettext* instance();
static void destroyInstance();
LauGettext();
~LauGettext();
void setCatalogueLocation(std::string location);
void setCatalogueName(std::string name);
void setLocale(std::string localeCode);
std::string moFilePath() const;
inline std::string locale() const { return locale_; }
inline std::string languageCode() const { return languageCode_; }
inline std::string countryCode() const { return countryCode_; }
inline std::string catalogueName() const { return catalogueName_; }
inline std::string catalogueLocation() const { return catalogueLocation_; }
GettextMessage* getTranslation(const char* originalString, int originalLength) const;
protected:
mutable GettextMoParser moParser_;
private:
std::string catalogueLocation_;
std::string languageCode_;
std::string countryCode_;
std::string locale_;
std::string catalogueName_;
static LauGettext* instance_;
};
#endif // Gettext_LauGettext_H