Use Core Foundation for testing locale availability under Mac
Using setlocale() is not the right way to do it there, try checking if the locale is supported by Core Foundation instead of whether it's supported by the Unix layer which is neglected and not used under Mac.
This commit is contained in:
@@ -1131,6 +1131,13 @@ bool wxLocale::IsAvailable(int lang)
|
||||
if ( !::IsValidLocale(info->GetLCID(), LCID_INSTALLED) )
|
||||
return false;
|
||||
|
||||
#elif defined(__WXOSX__)
|
||||
CFLocaleRef
|
||||
cfloc = CFLocaleCreate(kCFAllocatorDefault, wxCFStringRef(info->CanonicalName));
|
||||
if ( !cfloc )
|
||||
return false;
|
||||
|
||||
CFRelease(cfloc);
|
||||
#elif defined(__UNIX__)
|
||||
|
||||
// Test if setting the locale works, then set it back.
|
||||
|
Reference in New Issue
Block a user