Fall back to en_US if the system locale is not available.
Without this, msgids would be used instead of the more proper message strings. Also, since RefreshLocale() is never called, the menu goes missing.pull/168/head
parent
cde86a0626
commit
29e43e67ea
|
@ -1375,6 +1375,9 @@ int main(int argc, const char *argv[]) {
|
|||
dbp("%s", ([language UTF8String]));
|
||||
if(SolveSpace::SetLocale([language UTF8String])) break;
|
||||
}
|
||||
if([languages count] == 0) {
|
||||
SolveSpace::SetLocale("en_US");
|
||||
}
|
||||
|
||||
connexionInit();
|
||||
SolveSpace::SS.Init();
|
||||
|
|
|
@ -1517,8 +1517,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
|
|||
}
|
||||
#endif
|
||||
|
||||
// Use the user default locale.
|
||||
SetLocale((uint16_t)GetUserDefaultLCID());
|
||||
// Use the user default locale, then fall back to English.
|
||||
if(!SetLocale((uint16_t)GetUserDefaultLCID())) {
|
||||
SetLocale("en_US");
|
||||
}
|
||||
|
||||
// Call in to the platform-independent code, and let them do their init
|
||||
SS.Init();
|
||||
|
|
Loading…
Reference in New Issue