Check for C/POSIX locale just after we truncate language string
This way we can correctly detect C.UTF-8 as C locale. Closes https://github.com/wxWidgets/wxWidgets/pull/262
This commit is contained in:
committed by
Vadim Zeitlin
parent
ab0a64f0fb
commit
467dc72fc2
@@ -615,11 +615,6 @@ inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
||||
return wxLANGUAGE_ENGLISH_US;
|
||||
}
|
||||
|
||||
if ( langFull == wxS("C") || langFull == wxS("POSIX") )
|
||||
{
|
||||
// default C locale is English too
|
||||
return wxLANGUAGE_ENGLISH_US;
|
||||
}
|
||||
#endif
|
||||
|
||||
// the language string has the following form
|
||||
@@ -655,6 +650,12 @@ inline bool wxGetNonEmptyEnvVar(const wxString& name, wxString* value)
|
||||
langFull.Truncate(posEndLang);
|
||||
}
|
||||
|
||||
if ( langFull == wxS("C") || langFull == wxS("POSIX") )
|
||||
{
|
||||
// default C locale is English too
|
||||
return wxLANGUAGE_ENGLISH_US;
|
||||
}
|
||||
|
||||
// do we have just the language (or sublang too)?
|
||||
const bool justLang = langFull.find('_') == wxString::npos;
|
||||
|
||||
|
Reference in New Issue
Block a user