X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4def3b359546ee186b3db723db719f85b761f36a..6603907dea3324a55ea99608ee69e3b65634fe73:/src/common/strconv.cpp diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 54064c7064..1b69297e1d 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -758,12 +758,18 @@ void wxCSConv::LoadNow() // try to see if it's in the environment variables // (in most cases this won't work, but I was out of ideas) wxChar *lang = wxGetenv(wxT("LC_ALL")); - if (!lang) + wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL; + if (!dot) + { lang = wxGetenv(wxT("LC_CTYPE")); - if (!lang) + dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL; + } + if (!dot) + { lang = wxGetenv(wxT("LANG")); - wxChar *dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL; - if (dot) + dot = lang ? wxStrchr(lang, wxT('.')) : (wxChar *)NULL; + } + if (dot) SetName(dot+1); } #endif