Skip to content

Commit af7a5d7

Browse files
committed
If detecting users locale fails, default to english
1 parent 77d3cc7 commit af7a5d7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/myapp.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ struct MyApp : wxApp {
8181
if (shcore) FreeLibrary(shcore);
8282
#endif
8383

84-
locale.Init();
84+
auto lang = wxLocale::GetSystemLanguage();
85+
if (lang == wxLANGUAGE_UNKNOWN || !wxLocale::IsAvailable(lang)) {
86+
lang = wxLANGUAGE_ENGLISH;
87+
}
88+
locale.Init(lang);
8589

8690
bool portable = false;
8791
bool single_instance = true;

0 commit comments

Comments
 (0)