X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/470298433c5bfa9e816ea8868fbb17676f8d0a99..c437b3f4e47b74715a2f2385d4862972babd7802:/src/common/intl.cpp diff --git a/src/common/intl.cpp b/src/common/intl.cpp index f1e1ad9fc9..0960dfc57b 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -2517,13 +2517,12 @@ bool wxLocale::IsAvailable(int lang) #elif defined(__UNIX__) // Test if setting the locale works, then set it back. - const char *oldLocale = wxSetlocale(LC_ALL, ""); - const char *tmp = wxSetlocaleTryUTF8(LC_ALL, info->CanonicalName); - if ( !tmp ) + const char *oldLocale = wxSetlocaleTryUTF8(LC_ALL, info->CanonicalName); + if ( !oldLocale ) { // Some C libraries don't like xx_YY form and require xx only - tmp = wxSetlocaleTryUTF8(LC_ALL, ExtractLang(info->CanonicalName)); - if ( !tmp ) + oldLocale = wxSetlocaleTryUTF8(LC_ALL, ExtractLang(info->CanonicalName)); + if ( !oldLocale ) return false; } // restore the original locale @@ -2992,7 +2991,7 @@ wxString wxLocale::GetInfo(wxLocaleInfo index, wxLocaleCategory WXUNUSED(cat)) dateStyle = kCFDateFormatterShortStyle; break; case wxLOCALE_LONG_DATE_FMT: - dateStyle = kCFDateFormatterLongStyle; + dateStyle = kCFDateFormatterFullStyle; break; case wxLOCALE_DATE_TIME_FMT: dateStyle = kCFDateFormatterFullStyle;