Be case insensitive when looking for language catalogs on Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -155,13 +155,13 @@ wxString GetPreferredUILanguage(const wxArrayString& available)
|
|||||||
{
|
{
|
||||||
wxString lang(*j);
|
wxString lang(*j);
|
||||||
lang.Replace("-", "_");
|
lang.Replace("-", "_");
|
||||||
if ( available.Index(lang) != wxNOT_FOUND )
|
if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND )
|
||||||
return lang;
|
return lang;
|
||||||
size_t pos = lang.find('_');
|
size_t pos = lang.find('_');
|
||||||
if ( pos != wxString::npos )
|
if ( pos != wxString::npos )
|
||||||
{
|
{
|
||||||
lang = lang.substr(0, pos);
|
lang = lang.substr(0, pos);
|
||||||
if ( available.Index(lang) != wxNOT_FOUND )
|
if ( available.Index(lang, /*bCase=*/false) != wxNOT_FOUND )
|
||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user