diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:56:14 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 16:56:14 +0200 |
commit | 1046c195a9bbac24678c06310a4dd56b10347244 (patch) | |
tree | 89ad9f6fe3e538d65ef973b628ed9284b6c99e9f /library/misc.cpp | |
parent | 1.14 (diff) | |
download | FreeFileSync-1046c195a9bbac24678c06310a4dd56b10347244.tar.gz FreeFileSync-1046c195a9bbac24678c06310a4dd56b10347244.tar.bz2 FreeFileSync-1046c195a9bbac24678c06310a4dd56b10347244.zip |
1.15
Diffstat (limited to 'library/misc.cpp')
-rw-r--r-- | library/misc.cpp | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/library/misc.cpp b/library/misc.cpp index 050be108..f5c562c7 100644 --- a/library/misc.cpp +++ b/library/misc.cpp @@ -19,8 +19,7 @@ void exchangeEscapeChars(wxString& data) { //read next character ++input; - value = *input; - if (value == wxChar(0)) + if ((value = *input) == wxChar(0)) break; switch (value) @@ -60,23 +59,32 @@ void CustomLocale::setLanguage(const int language) { currentLanguage = language; - string languageFile; + std::string languageFile; switch (language) { - case wxLANGUAGE_GERMAN: - languageFile = "german.lng"; + case wxLANGUAGE_CHINESE_SIMPLIFIED: + languageFile = "Languages/chinese_simple.lng"; + break; + case wxLANGUAGE_DUTCH: + languageFile = "Languages/dutch.lng"; break; case wxLANGUAGE_FRENCH: - languageFile = "french.lng"; + languageFile = "Languages/french.lng"; + break; + case wxLANGUAGE_GERMAN: + languageFile = "Languages/german.lng"; + break; + case wxLANGUAGE_ITALIAN: + languageFile = "Languages/italian.lng"; break; case wxLANGUAGE_JAPANESE: - languageFile = "japanese.lng"; + languageFile = "Languages/japanese.lng"; break; - case wxLANGUAGE_DUTCH: - languageFile = "dutch.lng"; + case wxLANGUAGE_POLISH: + languageFile = "Languages/polish.lng"; break; - case wxLANGUAGE_CHINESE_SIMPLIFIED: - languageFile = "chinese_simple.lng"; + case wxLANGUAGE_PORTUGUESE: + languageFile = "Languages/portuguese.lng"; break; default: languageFile.clear(); @@ -96,7 +104,7 @@ void CustomLocale::setLanguage(const int language) char temp[bufferSize]; if (!languageFile.empty()) { - ifstream langFile(languageFile.c_str(), ios::binary); + std::ifstream langFile(languageFile.c_str(), std::ios::binary); if (langFile) { TranslationLine currentLine; |