Replace wxLocaleIdent ctor from language with FromTag()

This static function parses a subset of the language tags described in
BCP 47 (see https://www.rfc-editor.org/rfc/bcp/bcp47.txt).

Use the tag, as specified by this function, rather than the locale
identifiers components under MSW, where this should allow us to use even
locales that can't be described using just language-script-region.
This commit is contained in:
Vadim Zeitlin
2021-09-04 23:56:40 +02:00
parent a47a885718
commit 6b26deaddc
7 changed files with 178 additions and 37 deletions

View File

@@ -387,7 +387,7 @@ wxUILocaleImplUnix::CompareStrings(const wxString& lhs, const wxString& rhs,
/* static */
wxUILocaleImpl* wxUILocaleImpl::CreateStdC()
{
return new wxUILocaleImplUnix("C");
return new wxUILocaleImplUnix(wxLocaleIdent().Language("C"));
}
/* static */