fix the language code not correct issue

Change-Id: I73092fee16b2e1284ac79e63edbb3165c04d5650
This commit is contained in:
lane.wei authored and Lane.Wei committed 2022-07-23 20:57:06 +08:00
1 parent 0df07fcfde
commit 7a68cc56b2
2 files changed
+26 -5

No files matched your search

+1 -2
View File
@@ -634,7 +634,6 @@ wxWindow* PreferencesDialog::create_general_page()
// bbs supported languages
wxLanguage supported_languages[]{wxLANGUAGE_ENGLISH, wxLANGUAGE_CHINESE_SIMPLIFIED, wxLANGUAGE_GERMAN, wxLANGUAGE_FRENCH, wxLANGUAGE_SPANISH, wxLANGUAGE_SWEDISH, wxLANGUAGE_DUTCH };
auto translations = wxTranslations::Get()->GetAvailableTranslations(SLIC3R_APP_KEY);
std::vector<const wxLanguageInfo *> language_infos;
language_infos.emplace_back(wxLocale::GetLanguageInfo(wxLANGUAGE_ENGLISH));
@@ -643,7 +642,7 @@ wxWindow* PreferencesDialog::create_general_page()
if (langinfo == nullptr) continue;
for (auto si = 0; si < sizeof(supported_languages); si++) {
for (auto si = 0; si < 7; si++) {
if (langinfo == wxLocale::GetLanguageInfo(supported_languages[si])) {
language_infos.emplace_back(langinfo);
}