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