VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/PreferencesDialog.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-30 01:22:05 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-06-30 01:22:05 +0200
commit96974169199d347172fc5d4a2924f092d602b3de (patch)
tree627633460b7e830d7a4dcb58de37733d84742e46 /src/Main/Forms/PreferencesDialog.cpp
parent1e7d6948c991e8c0153fdbf06d82844595c138f8 (diff)
downloadVeraCrypt-96974169199d347172fc5d4a2924f092d602b3de.tar.gz
VeraCrypt-96974169199d347172fc5d4a2924f092d602b3de.zip
Linux: Make the C++ code compatible with old compilers (g++ 4.4.7 on CentOS 6)
Diffstat (limited to 'src/Main/Forms/PreferencesDialog.cpp')
-rw-r--r--src/Main/Forms/PreferencesDialog.cpp53
1 files changed, 49 insertions, 4 deletions
diff --git a/src/Main/Forms/PreferencesDialog.cpp b/src/Main/Forms/PreferencesDialog.cpp
index c4d5140f..afc2871f 100644
--- a/src/Main/Forms/PreferencesDialog.cpp
+++ b/src/Main/Forms/PreferencesDialog.cpp
@@ -82,6 +82,51 @@ namespace VeraCrypt
LanguageListBox->Append("System default");
LanguageListBox->Append("English");
+ langEntries = {
+ {"system", L"System default"},
+ {"ar", L"العربية"},
+ {"be", L"Беларуская"},
+ {"bg", L"Български"},
+ {"ca", L"Català"},
+ {"co", L"Corsu"},
+ {"cs", L"Čeština"},
+ {"da", L"Dansk"},
+ {"de", L"Deutsch"},
+ {"el", L"Ελληνικά"},
+ {"en", L"English"},
+ {"es", L"Español"},
+ {"et", L"Eesti"},
+ {"eu", L"Euskara"},
+ {"fa", L"فارسي"},
+ {"fi", L"Suomi"},
+ {"fr", L"Français"},
+ {"he", L"עברית"},
+ {"hu", L"Magyar"},
+ {"id", L"Bahasa Indonesia"},
+ {"it", L"Italiano"},
+ {"ja", L"日本語"},
+ {"ka", L"ქართული"},
+ {"ko", L"한국어"},
+ {"lv", L"Latviešu"},
+ {"nl", L"Nederlands"},
+ {"nn", L"Norsk Nynorsk"},
+ {"pl", L"Polski"},
+ {"ro", L"Română"},
+ {"ru", L"Русский"},
+ {"pt-br", L"Português-Brasil"},
+ {"sk", L"Slovenčina"},
+ {"sl", L"Slovenščina"},
+ {"sv", L"Svenska"},
+ {"th", L"ภาษาไทย"},
+ {"tr", L"Türkçe"},
+ {"uk", L"Українська"},
+ {"uz", L"Ўзбекча"},
+ {"vi", L"Tiếng Việt"},
+ {"zh-cn", L"简体中文"},
+ {"zh-hk", L"繁體中文(香港)"},
+ {"zh-tw", L"繁體中文"}
+ };
+
if (wxDir::Exists(languagesFolder.GetName())) {
size_t langCount;
langCount = wxDir::GetAllFiles(languagesFolder.GetName(), &langArray, wxEmptyString, wxDIR_FILES);
@@ -435,11 +480,11 @@ namespace VeraCrypt
if (LanguageListBox->GetSelection() != wxNOT_FOUND) {
wxString langToFind = LanguageListBox->GetString(LanguageListBox->GetSelection());
- for (const auto &each: langEntries) {
- if (each.second == langToFind) {
- Preferences.Language = each.first;
+ for (map<wxString, std::wstring>::const_iterator each = langEntries.begin(); each != langEntries.end(); ++each) {
+ if (each->second == langToFind) {
+ Preferences.Language = each->first;
#ifdef DEBUG
- cout << "Lang set to: " << each.first << endl;
+ cout << "Lang set to: " << each->first << endl;
#endif
}
}