Call SetThreadUILanguage() on Windows

Starting with Vista, SetThreadLocale() does basically nothing and does
not affect UI language. We need to call SetThreadUILanguage() as well
from wxLocale::Init() to have the locale reflected in e.g. standard
dialogs.
This commit is contained in:
Vaclav Slavik 2015-06-10 18:32:49 +02:00
parent 6cc7811394
commit 3a8ad95230

View File

@ -472,6 +472,13 @@ bool wxLocale::Init(int language, int flags)
// change locale used by Windows functions
::SetThreadLocale(lcid);
// SetThreadUILanguage() is available on XP, but with unclear
// behavior, so avoid calling it there.
if ( wxGetWinVersion() >= wxWinVersion_Vista )
{
SetThreadUILanguage(LANGIDFROMLCID(lcid));
}
#endif
// and also call setlocale() to change locale used by the CRT