fix the language code not correct issue

Change-Id: I73092fee16b2e1284ac79e63edbb3165c04d5650
This commit is contained in:
lane.wei 2022-07-23 18:49:16 +08:00 committed by Lane.Wei
parent 0df07fcfde
commit 7a68cc56b2
2 changed files with 26 additions and 5 deletions

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);
}