Recognize "ll_LL" as at language "ll" in GetSystemLanguage()
If we can't find an exact match for the system locale in the database, try to at least find the corresponding language. This is almost certainly what the intention of the original code was, as otherwise the entire loop was useless because it couldn't find anything that wouldn't have been found in the loop just above. This allows to correctly load German translations when using unsupported locale such as "de_IT", for example. See #19082.
This commit is contained in:
@@ -732,7 +732,7 @@ inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
||||
{
|
||||
for ( i = 0; i < count; i++ )
|
||||
{
|
||||
if ( ms_languagesDB->Item(i).CanonicalName == lang )
|
||||
if ( ExtractLang(ms_languagesDB->Item(i).CanonicalName) == lang )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user