Fix passing of default language to wxTranslations
wxTranslations needs the information that user's default language is
used; in particular, it may choose to use a cascade of user-preferred
languages to choose the best UI language.
This was accidentally broken by
18bf718f60
which changed the logic to
fill shortName from the builtin database. This consequently changed
wxTranslations to use only the single detected language and ignore
user's preference cascade.
Closes https://github.com/wxWidgets/wxWidgets/pull/2385
This commit is contained in:
parent
e050c2a1b7
commit
3417c8e48b
@ -615,7 +615,9 @@ bool wxLocale::Init(int lang, int flags)
|
|||||||
(
|
(
|
||||||
retloc != NULL,
|
retloc != NULL,
|
||||||
name,
|
name,
|
||||||
shortName,
|
// wxLANGUAGE_DEFAULT needs to be passed to wxTranslations as ""
|
||||||
|
// for correct detection of user's preferred language(s)
|
||||||
|
lang == wxLANGUAGE_DEFAULT ? wxString() : shortName,
|
||||||
flags & wxLOCALE_LOAD_DEFAULT
|
flags & wxLOCALE_LOAD_DEFAULT
|
||||||
);
|
);
|
||||||
#else // !(__UNIX__ || __WIN32__)
|
#else // !(__UNIX__ || __WIN32__)
|
||||||
|
Loading…
Reference in New Issue
Block a user