corrected setting the locale of the c-lib for mac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
c95393460e
commit
85fb220621
@ -1685,7 +1685,25 @@ bool wxLocale::Init(int language, int flags)
|
||||
wxLogError(wxT("Cannot set locale to language %s."), name.c_str());
|
||||
return false;
|
||||
}
|
||||
#elif defined(__WXMAC__) || defined(__WXPM__)
|
||||
#elif defined(__WXMAC__)
|
||||
if (language == wxLANGUAGE_DEFAULT)
|
||||
locale = wxEmptyString;
|
||||
else
|
||||
locale = info->CanonicalName;
|
||||
|
||||
wxMB2WXbuf retloc = wxSetlocale(LC_ALL, locale);
|
||||
|
||||
if ( !retloc )
|
||||
{
|
||||
// Some C libraries don't like xx_YY form and require xx only
|
||||
retloc = wxSetlocale(LC_ALL, locale.Mid(0,2));
|
||||
}
|
||||
if ( !retloc )
|
||||
{
|
||||
wxLogError(wxT("Cannot set locale to '%s'."), locale.c_str());
|
||||
return false;
|
||||
}
|
||||
#elif defined(__WXPM__)
|
||||
wxMB2WXbuf retloc = wxSetlocale(LC_ALL , wxEmptyString);
|
||||
#else
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user