Game Develop Core: LocaleManager.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
LocaleManager.h
Go to the documentation of this file.
1
6 #if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
7
8 #ifndef LOCALEMANAGER_H
9 #define LOCALEMANAGER_H
10 #include "GDCore/Tools/Localization.h"
11
12 namespace gd
13 {
14
22 class GD_CORE_API LocaleManager
23 {
24 public:
25 wxLocale * locale;
26
31 bool SetLanguage(int languageWxWidgetsId);
32
37 int GetLanguage() { return languageWxWidgetsId; }
38
46 void AddCatalog(std::string catalogName);
47
52 void AddPath(std::string path);
53
54 static LocaleManager *GetInstance()
55 {
56 if ( !_singleton )
57 {
58 _singleton = new LocaleManager;
59 }
60
61 return ( static_cast<LocaleManager*>( _singleton ) );
62 }
63
64 static void DestroySingleton()
65 {
66 if ( _singleton )
67 {
68 delete _singleton;
69 _singleton = 0;
70 }
71 }
72
73 private:
74
75 LocaleManager() : locale(NULL) {};
76 virtual ~LocaleManager() {};
77
78 int languageWxWidgetsId;
79
80 static LocaleManager *_singleton;
81 };
82
83 }
84
85 #endif // LOCALEMANAGER_H
86 #endif