- // (This time, we changed locale in previous if-branch, so try again.)
- // Some C libraries don't like xx_YY form and require xx only
- retloc = wxSetlocaleTryUTF(LC_ALL, locale.Mid(0,2));
+ // Some C libraries (namely glibc) still use old ISO 639,
+ // so will translate the abbrev for them
+ wxString localeAlt;
+ if ( langOnly == wxT("he") )
+ localeAlt = wxT("iw") + locale.Mid(3);
+ else if ( langOnly == wxT("id") )
+ localeAlt = wxT("in") + locale.Mid(3);
+ else if ( langOnly == wxT("yi") )
+ localeAlt = wxT("ji") + locale.Mid(3);
+ else if ( langOnly == wxT("nb") )
+ localeAlt = wxT("no_NO");
+ else if ( langOnly == wxT("nn") )
+ localeAlt = wxT("no_NY");
+
+ if ( !localeAlt.empty() )
+ {
+ retloc = wxSetlocaleTryUTF(LC_ALL, localeAlt);
+ if ( !retloc )
+ retloc = wxSetlocaleTryUTF(LC_ALL, locale.Left(2));
+ }