ImGraph
 All Classes Functions Variables Enumerations Pages
Internationalizator.h
1 #ifndef _INTERNATIONALIZATOR_HEADER_
2 #define _INTERNATIONALIZATOR_HEADER_
3 
4 #ifdef _WIN32
5 #pragma warning(push)
6 #pragma warning(disable:4996 4251 4275 4800 4503)
7 #endif
8 #include <boost/format.hpp>
9 
10 #include <string>
11 #include <map>
12 #include <QString>
13 #ifdef _WIN32
14 #pragma warning(pop)
15 #endif
16 
17 namespace charliesoft
18 {
19  boost::format my_format(const std::string & f_string);
20 
22  {
24  ~Internationalizator(){};//nothing to do...
25 
26  static Internationalizator *ptr;
27 
28  std::map< std::string, std::string > translations;
29 
30  void initTranslations();
31  public:
32  static Internationalizator* getInstance();
33  static void releaseInstance();
34 
35  void setLang(std::string resourceFile);
36 
37  std::string getTranslation(std::string key);
38  };
39 
41  QString _QT(std::string key);
42  std::string _STR(std::string key);
43 }
44 
45 
46 #endif
Definition: Internationalizator.h:21
void setLang(std::string resourceFile)
Definition: Internationalizator.cpp:52