diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:50:14 +0200 |
commit | ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4 (patch) | |
tree | dcc7dd2ed76fd0900944c07776fcbdbcd665c020 /library/misc.h | |
parent | 1.5 (diff) | |
download | FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.gz FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.tar.bz2 FreeFileSync-ad0ea7798b82cc3a4dfed4c2fce6f2cb1b6805e4.zip |
1.6
Diffstat (limited to 'library/misc.h')
-rw-r--r-- | library/misc.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/library/misc.h b/library/misc.h new file mode 100644 index 00000000..a8db4088 --- /dev/null +++ b/library/misc.h @@ -0,0 +1,52 @@ +#ifndef MISC_H_INCLUDED +#define MISC_H_INCLUDED + +#include <wx/string.h> +#include <set> +#include <wx/intl.h> + +using namespace std; + +struct TranslationLine +{ + wxString original; + wxString translation; + + bool operator>(const TranslationLine& b ) const + { + return (original > b.original); + } + bool operator<(const TranslationLine& b) const + { + return (original < b.original); + } + bool operator==(const TranslationLine& b) const + { + return (original == b.original); + } +}; +typedef set<TranslationLine> Translation; + + +class CustomLocale : public wxLocale +{ +public: + CustomLocale(); + + ~CustomLocale(); + + void loadLanguageFromCfg(); + void loadLanguageFile(int language); + int getLanguage() + { + return currentLanguage; + } + + const wxChar* GetString(const wxChar* szOrigString, const wxChar* szDomain = NULL) const; + +private: + Translation translationDB; + int currentLanguage; +}; + +#endif // MISC_H_INCLUDED |