3 /* Determine the current selected locale.
4 Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
20 /* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
21 /* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
30 #if defined _WIN32 || defined __WIN32__
31 # undef WIN32 /* avoid warning on mingw32 */
36 # define WIN32_LEAN_AND_MEAN
38 /* Mingw headers don't have latest language and sublanguage codes. */
39 # ifndef LANG_AFRIKAANS
40 # define LANG_AFRIKAANS 0x36
42 # ifndef LANG_ALBANIAN
43 # define LANG_ALBANIAN 0x1c
46 # define LANG_ARABIC 0x01
48 # ifndef LANG_ARMENIAN
49 # define LANG_ARMENIAN 0x2b
51 # ifndef LANG_ASSAMESE
52 # define LANG_ASSAMESE 0x4d
55 # define LANG_AZERI 0x2c
58 # define LANG_BASQUE 0x2d
60 # ifndef LANG_BELARUSIAN
61 # define LANG_BELARUSIAN 0x23
64 # define LANG_BENGALI 0x45
67 # define LANG_CATALAN 0x03
69 # ifndef LANG_ESTONIAN
70 # define LANG_ESTONIAN 0x25
72 # ifndef LANG_FAEROESE
73 # define LANG_FAEROESE 0x38
76 # define LANG_FARSI 0x29
78 # ifndef LANG_GEORGIAN
79 # define LANG_GEORGIAN 0x37
81 # ifndef LANG_GUJARATI
82 # define LANG_GUJARATI 0x47
85 # define LANG_HEBREW 0x0d
88 # define LANG_HINDI 0x39
90 # ifndef LANG_INDONESIAN
91 # define LANG_INDONESIAN 0x21
94 # define LANG_KANNADA 0x4b
96 # ifndef LANG_KASHMIRI
97 # define LANG_KASHMIRI 0x60
100 # define LANG_KAZAK 0x3f
102 # ifndef LANG_KONKANI
103 # define LANG_KONKANI 0x57
105 # ifndef LANG_LATVIAN
106 # define LANG_LATVIAN 0x26
108 # ifndef LANG_LITHUANIAN
109 # define LANG_LITHUANIAN 0x27
111 # ifndef LANG_MACEDONIAN
112 # define LANG_MACEDONIAN 0x2f
115 # define LANG_MALAY 0x3e
117 # ifndef LANG_MALAYALAM
118 # define LANG_MALAYALAM 0x4c
120 # ifndef LANG_MANIPURI
121 # define LANG_MANIPURI 0x58
123 # ifndef LANG_MARATHI
124 # define LANG_MARATHI 0x4e
127 # define LANG_NEPALI 0x61
130 # define LANG_ORIYA 0x48
132 # ifndef LANG_PUNJABI
133 # define LANG_PUNJABI 0x46
135 # ifndef LANG_SANSKRIT
136 # define LANG_SANSKRIT 0x4f
138 # ifndef LANG_SERBIAN
139 # define LANG_SERBIAN 0x1a
142 # define LANG_SINDHI 0x59
145 # define LANG_SLOVAK 0x1b
147 # ifndef LANG_SWAHILI
148 # define LANG_SWAHILI 0x41
151 # define LANG_TAMIL 0x49
154 # define LANG_TATAR 0x44
157 # define LANG_TELUGU 0x4a
160 # define LANG_THAI 0x1e
162 # ifndef LANG_UKRAINIAN
163 # define LANG_UKRAINIAN 0x22
166 # define LANG_URDU 0x20
169 # define LANG_UZBEK 0x43
171 # ifndef LANG_VIETNAMESE
172 # define LANG_VIETNAMESE 0x2a
174 # ifndef SUBLANG_ARABIC_SAUDI_ARABIA
175 # define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
177 # ifndef SUBLANG_ARABIC_IRAQ
178 # define SUBLANG_ARABIC_IRAQ 0x02
180 # ifndef SUBLANG_ARABIC_EGYPT
181 # define SUBLANG_ARABIC_EGYPT 0x03
183 # ifndef SUBLANG_ARABIC_LIBYA
184 # define SUBLANG_ARABIC_LIBYA 0x04
186 # ifndef SUBLANG_ARABIC_ALGERIA
187 # define SUBLANG_ARABIC_ALGERIA 0x05
189 # ifndef SUBLANG_ARABIC_MOROCCO
190 # define SUBLANG_ARABIC_MOROCCO 0x06
192 # ifndef SUBLANG_ARABIC_TUNISIA
193 # define SUBLANG_ARABIC_TUNISIA 0x07
195 # ifndef SUBLANG_ARABIC_OMAN
196 # define SUBLANG_ARABIC_OMAN 0x08
198 # ifndef SUBLANG_ARABIC_YEMEN
199 # define SUBLANG_ARABIC_YEMEN 0x09
201 # ifndef SUBLANG_ARABIC_SYRIA
202 # define SUBLANG_ARABIC_SYRIA 0x0a
204 # ifndef SUBLANG_ARABIC_JORDAN
205 # define SUBLANG_ARABIC_JORDAN 0x0b
207 # ifndef SUBLANG_ARABIC_LEBANON
208 # define SUBLANG_ARABIC_LEBANON 0x0c
210 # ifndef SUBLANG_ARABIC_KUWAIT
211 # define SUBLANG_ARABIC_KUWAIT 0x0d
213 # ifndef SUBLANG_ARABIC_UAE
214 # define SUBLANG_ARABIC_UAE 0x0e
216 # ifndef SUBLANG_ARABIC_BAHRAIN
217 # define SUBLANG_ARABIC_BAHRAIN 0x0f
219 # ifndef SUBLANG_ARABIC_QATAR
220 # define SUBLANG_ARABIC_QATAR 0x10
222 # ifndef SUBLANG_AZERI_LATIN
223 # define SUBLANG_AZERI_LATIN 0x01
225 # ifndef SUBLANG_AZERI_CYRILLIC
226 # define SUBLANG_AZERI_CYRILLIC 0x02
228 # ifndef SUBLANG_CHINESE_MACAU
229 # define SUBLANG_CHINESE_MACAU 0x05
231 # ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
232 # define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
234 # ifndef SUBLANG_ENGLISH_JAMAICA
235 # define SUBLANG_ENGLISH_JAMAICA 0x08
237 # ifndef SUBLANG_ENGLISH_CARIBBEAN
238 # define SUBLANG_ENGLISH_CARIBBEAN 0x09
240 # ifndef SUBLANG_ENGLISH_BELIZE
241 # define SUBLANG_ENGLISH_BELIZE 0x0a
243 # ifndef SUBLANG_ENGLISH_TRINIDAD
244 # define SUBLANG_ENGLISH_TRINIDAD 0x0b
246 # ifndef SUBLANG_ENGLISH_ZIMBABWE
247 # define SUBLANG_ENGLISH_ZIMBABWE 0x0c
249 # ifndef SUBLANG_ENGLISH_PHILIPPINES
250 # define SUBLANG_ENGLISH_PHILIPPINES 0x0d
252 # ifndef SUBLANG_FRENCH_LUXEMBOURG
253 # define SUBLANG_FRENCH_LUXEMBOURG 0x05
255 # ifndef SUBLANG_FRENCH_MONACO
256 # define SUBLANG_FRENCH_MONACO 0x06
258 # ifndef SUBLANG_GERMAN_LUXEMBOURG
259 # define SUBLANG_GERMAN_LUXEMBOURG 0x04
261 # ifndef SUBLANG_GERMAN_LIECHTENSTEIN
262 # define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
264 # ifndef SUBLANG_KASHMIRI_INDIA
265 # define SUBLANG_KASHMIRI_INDIA 0x02
267 # ifndef SUBLANG_MALAY_MALAYSIA
268 # define SUBLANG_MALAY_MALAYSIA 0x01
270 # ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
271 # define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
273 # ifndef SUBLANG_NEPALI_INDIA
274 # define SUBLANG_NEPALI_INDIA 0x02
276 # ifndef SUBLANG_SERBIAN_LATIN
277 # define SUBLANG_SERBIAN_LATIN 0x02
279 # ifndef SUBLANG_SERBIAN_CYRILLIC
280 # define SUBLANG_SERBIAN_CYRILLIC 0x03
282 # ifndef SUBLANG_SPANISH_GUATEMALA
283 # define SUBLANG_SPANISH_GUATEMALA 0x04
285 # ifndef SUBLANG_SPANISH_COSTA_RICA
286 # define SUBLANG_SPANISH_COSTA_RICA 0x05
288 # ifndef SUBLANG_SPANISH_PANAMA
289 # define SUBLANG_SPANISH_PANAMA 0x06
291 # ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
292 # define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
294 # ifndef SUBLANG_SPANISH_VENEZUELA
295 # define SUBLANG_SPANISH_VENEZUELA 0x08
297 # ifndef SUBLANG_SPANISH_COLOMBIA
298 # define SUBLANG_SPANISH_COLOMBIA 0x09
300 # ifndef SUBLANG_SPANISH_PERU
301 # define SUBLANG_SPANISH_PERU 0x0a
303 # ifndef SUBLANG_SPANISH_ARGENTINA
304 # define SUBLANG_SPANISH_ARGENTINA 0x0b
306 # ifndef SUBLANG_SPANISH_ECUADOR
307 # define SUBLANG_SPANISH_ECUADOR 0x0c
309 # ifndef SUBLANG_SPANISH_CHILE
310 # define SUBLANG_SPANISH_CHILE 0x0d
312 # ifndef SUBLANG_SPANISH_URUGUAY
313 # define SUBLANG_SPANISH_URUGUAY 0x0e
315 # ifndef SUBLANG_SPANISH_PARAGUAY
316 # define SUBLANG_SPANISH_PARAGUAY 0x0f
318 # ifndef SUBLANG_SPANISH_BOLIVIA
319 # define SUBLANG_SPANISH_BOLIVIA 0x10
321 # ifndef SUBLANG_SPANISH_EL_SALVADOR
322 # define SUBLANG_SPANISH_EL_SALVADOR 0x11
324 # ifndef SUBLANG_SPANISH_HONDURAS
325 # define SUBLANG_SPANISH_HONDURAS 0x12
327 # ifndef SUBLANG_SPANISH_NICARAGUA
328 # define SUBLANG_SPANISH_NICARAGUA 0x13
330 # ifndef SUBLANG_SPANISH_PUERTO_RICO
331 # define SUBLANG_SPANISH_PUERTO_RICO 0x14
333 # ifndef SUBLANG_SWEDISH_FINLAND
334 # define SUBLANG_SWEDISH_FINLAND 0x02
336 # ifndef SUBLANG_URDU_PAKISTAN
337 # define SUBLANG_URDU_PAKISTAN 0x01
339 # ifndef SUBLANG_URDU_INDIA
340 # define SUBLANG_URDU_INDIA 0x02
342 # ifndef SUBLANG_UZBEK_LATIN
343 # define SUBLANG_UZBEK_LATIN 0x01
345 # ifndef SUBLANG_UZBEK_CYRILLIC
346 # define SUBLANG_UZBEK_CYRILLIC 0x02
350 /* XPG3 defines the result of 'setlocale (category, NULL)' as:
351 "Directs 'setlocale()' to query 'category' and return the current
353 However it does not specify the exact format. Neither do SUSV2 and
354 ISO C 99. So we can use this feature only on selected systems (e.g.
355 those using GNU C Library). */
356 #if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
357 # define HAVE_LOCALE_NULL
360 /* Determine the current locale's name, and canonicalize it into XPG syntax
361 language[_territory[.codeset]][@modifier]
362 The codeset part in the result is not reliable; the locale_charset()
363 should be used for codeset information instead.
364 The result must not be freed; it is statically allocated. */
367 _nl_locale_name (category
, categoryname
)
369 const char *categoryname
;
375 /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
376 On some systems this can be done by the 'setlocale' function itself. */
377 # if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
378 retval
= setlocale (category
, NULL
);
380 /* Setting of LC_ALL overwrites all other. */
381 retval
= getenv ("LC_ALL");
382 if (retval
== NULL
|| retval
[0] == '\0')
384 /* Next comes the name of the desired category. */
385 retval
= getenv (categoryname
);
386 if (retval
== NULL
|| retval
[0] == '\0')
388 /* Last possibility is the LANG environment variable. */
389 retval
= getenv ("LANG");
390 if (retval
== NULL
|| retval
[0] == '\0')
391 /* We use C as the default domain. POSIX says this is
392 implementation defined. */
402 /* Return an XPG style locale name language[_territory][@modifier].
403 Don't even bother determining the codeset; it's not useful in this
404 context, because message catalogs are not specific to a single
411 /* Let the user override the system settings through environment
412 variables, as on POSIX systems. */
413 retval
= getenv ("LC_ALL");
414 if (retval
!= NULL
&& retval
[0] != '\0')
416 retval
= getenv (categoryname
);
417 if (retval
!= NULL
&& retval
[0] != '\0')
419 retval
= getenv ("LANG");
420 if (retval
!= NULL
&& retval
[0] != '\0')
423 /* Use native Win32 API locale ID. */
424 lcid
= GetThreadLocale ();
426 /* Strip off the sorting rules, keep only the language part. */
427 langid
= LANGIDFROMLCID (lcid
);
429 /* Split into language and territory part. */
430 primary
= PRIMARYLANGID (langid
);
431 sub
= SUBLANGID (langid
);
434 case LANG_AFRIKAANS
: return "af_ZA";
435 case LANG_ALBANIAN
: return "sq_AL";
439 case SUBLANG_ARABIC_SAUDI_ARABIA
: return "ar_SA";
440 case SUBLANG_ARABIC_IRAQ
: return "ar_IQ";
441 case SUBLANG_ARABIC_EGYPT
: return "ar_EG";
442 case SUBLANG_ARABIC_LIBYA
: return "ar_LY";
443 case SUBLANG_ARABIC_ALGERIA
: return "ar_DZ";
444 case SUBLANG_ARABIC_MOROCCO
: return "ar_MA";
445 case SUBLANG_ARABIC_TUNISIA
: return "ar_TN";
446 case SUBLANG_ARABIC_OMAN
: return "ar_OM";
447 case SUBLANG_ARABIC_YEMEN
: return "ar_YE";
448 case SUBLANG_ARABIC_SYRIA
: return "ar_SY";
449 case SUBLANG_ARABIC_JORDAN
: return "ar_JO";
450 case SUBLANG_ARABIC_LEBANON
: return "ar_LB";
451 case SUBLANG_ARABIC_KUWAIT
: return "ar_KW";
452 case SUBLANG_ARABIC_UAE
: return "ar_AE";
453 case SUBLANG_ARABIC_BAHRAIN
: return "ar_BH";
454 case SUBLANG_ARABIC_QATAR
: return "ar_QA";
457 case LANG_ARMENIAN
: return "hy_AM";
458 case LANG_ASSAMESE
: return "as_IN";
462 /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
463 case SUBLANG_AZERI_LATIN
: return "az_AZ@latin";
464 case SUBLANG_AZERI_CYRILLIC
: return "az_AZ@cyrillic";
468 return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
469 case LANG_BELARUSIAN
: return "be_BY";
470 case LANG_BENGALI
: return "bn_IN";
471 case LANG_BULGARIAN
: return "bg_BG";
472 case LANG_CATALAN
: return "ca_ES";
476 case SUBLANG_CHINESE_TRADITIONAL
: return "zh_TW";
477 case SUBLANG_CHINESE_SIMPLIFIED
: return "zh_CN";
478 case SUBLANG_CHINESE_HONGKONG
: return "zh_HK";
479 case SUBLANG_CHINESE_SINGAPORE
: return "zh_SG";
480 case SUBLANG_CHINESE_MACAU
: return "zh_MO";
483 case LANG_CROATIAN
: /* LANG_CROATIAN == LANG_SERBIAN
484 * What used to be called Serbo-Croatian
485 * should really now be two separate
486 * languages because of political reasons.
487 * (Says tml, who knows nothing about Serbian
489 * (I can feel those flames coming already.)
493 /* FIXME: How to distinguish Croatian and Latin Serbian locales? */
494 case SUBLANG_SERBIAN_LATIN
: return "sr_YU";
495 case SUBLANG_SERBIAN_CYRILLIC
: return "sr_YU@cyrillic";
496 default: return "hr_HR";
498 case LANG_CZECH
: return "cs_CZ";
499 case LANG_DANISH
: return "da_DK";
503 case SUBLANG_DUTCH
: return "nl_NL";
504 case SUBLANG_DUTCH_BELGIAN
: return "nl_BE";
510 /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
511 * English was the language spoken in England.
514 case SUBLANG_ENGLISH_US
: return "en_US";
515 case SUBLANG_ENGLISH_UK
: return "en_GB";
516 case SUBLANG_ENGLISH_AUS
: return "en_AU";
517 case SUBLANG_ENGLISH_CAN
: return "en_CA";
518 case SUBLANG_ENGLISH_NZ
: return "en_NZ";
519 case SUBLANG_ENGLISH_EIRE
: return "en_IE";
520 case SUBLANG_ENGLISH_SOUTH_AFRICA
: return "en_ZA";
521 case SUBLANG_ENGLISH_JAMAICA
: return "en_JM";
522 case SUBLANG_ENGLISH_CARIBBEAN
: return "en_GD"; /* Grenada? */
523 case SUBLANG_ENGLISH_BELIZE
: return "en_BZ";
524 case SUBLANG_ENGLISH_TRINIDAD
: return "en_TT";
525 case SUBLANG_ENGLISH_ZIMBABWE
: return "en_ZW";
526 case SUBLANG_ENGLISH_PHILIPPINES
: return "en_PH";
529 case LANG_ESTONIAN
: return "et_EE";
530 case LANG_FAEROESE
: return "fo_FO";
531 case LANG_FARSI
: return "fa_IR";
532 case LANG_FINNISH
: return "fi_FI";
536 case SUBLANG_FRENCH
: return "fr_FR";
537 case SUBLANG_FRENCH_BELGIAN
: return "fr_BE";
538 case SUBLANG_FRENCH_CANADIAN
: return "fr_CA";
539 case SUBLANG_FRENCH_SWISS
: return "fr_CH";
540 case SUBLANG_FRENCH_LUXEMBOURG
: return "fr_LU";
541 case SUBLANG_FRENCH_MONACO
: return "fr_MC";
544 case LANG_GEORGIAN
: return "ka_GE";
548 case SUBLANG_GERMAN
: return "de_DE";
549 case SUBLANG_GERMAN_SWISS
: return "de_CH";
550 case SUBLANG_GERMAN_AUSTRIAN
: return "de_AT";
551 case SUBLANG_GERMAN_LUXEMBOURG
: return "de_LU";
552 case SUBLANG_GERMAN_LIECHTENSTEIN
: return "de_LI";
555 case LANG_GREEK
: return "el_GR";
556 case LANG_GUJARATI
: return "gu_IN";
557 case LANG_HEBREW
: return "he_IL";
558 case LANG_HINDI
: return "hi_IN";
559 case LANG_HUNGARIAN
: return "hu_HU";
560 case LANG_ICELANDIC
: return "is_IS";
561 case LANG_INDONESIAN
: return "id_ID";
565 case SUBLANG_ITALIAN
: return "it_IT";
566 case SUBLANG_ITALIAN_SWISS
: return "it_CH";
569 case LANG_JAPANESE
: return "ja_JP";
570 case LANG_KANNADA
: return "kn_IN";
574 case SUBLANG_DEFAULT
: return "ks_PK";
575 case SUBLANG_KASHMIRI_INDIA
: return "ks_IN";
578 case LANG_KAZAK
: return "kk_KZ";
580 /* FIXME: Adjust this when such locales appear on Unix. */
582 case LANG_KOREAN
: return "ko_KR";
583 case LANG_LATVIAN
: return "lv_LV";
584 case LANG_LITHUANIAN
: return "lt_LT";
585 case LANG_MACEDONIAN
: return "mk_MK";
589 case SUBLANG_MALAY_MALAYSIA
: return "ms_MY";
590 case SUBLANG_MALAY_BRUNEI_DARUSSALAM
: return "ms_BN";
593 case LANG_MALAYALAM
: return "ml_IN";
595 /* FIXME: Adjust this when such locales appear on Unix. */
597 case LANG_MARATHI
: return "mr_IN";
601 case SUBLANG_DEFAULT
: return "ne_NP";
602 case SUBLANG_NEPALI_INDIA
: return "ne_IN";
608 case SUBLANG_NORWEGIAN_BOKMAL
: return "no_NO";
609 case SUBLANG_NORWEGIAN_NYNORSK
: return "nn_NO";
612 case LANG_ORIYA
: return "or_IN";
613 case LANG_POLISH
: return "pl_PL";
614 case LANG_PORTUGUESE
:
617 case SUBLANG_PORTUGUESE
: return "pt_PT";
618 /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
619 Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
620 case SUBLANG_PORTUGUESE_BRAZILIAN
: return "pt_BR";
623 case LANG_PUNJABI
: return "pa_IN";
624 case LANG_ROMANIAN
: return "ro_RO";
626 return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
627 case LANG_SANSKRIT
: return "sa_IN";
628 case LANG_SINDHI
: return "sd";
629 case LANG_SLOVAK
: return "sk_SK";
630 case LANG_SLOVENIAN
: return "sl_SI";
632 /* FIXME: Adjust this when such locales appear on Unix. */
637 case SUBLANG_SPANISH
: return "es_ES";
638 case SUBLANG_SPANISH_MEXICAN
: return "es_MX";
639 case SUBLANG_SPANISH_MODERN
:
640 return "es_ES@modern"; /* not seen on Unix */
641 case SUBLANG_SPANISH_GUATEMALA
: return "es_GT";
642 case SUBLANG_SPANISH_COSTA_RICA
: return "es_CR";
643 case SUBLANG_SPANISH_PANAMA
: return "es_PA";
644 case SUBLANG_SPANISH_DOMINICAN_REPUBLIC
: return "es_DO";
645 case SUBLANG_SPANISH_VENEZUELA
: return "es_VE";
646 case SUBLANG_SPANISH_COLOMBIA
: return "es_CO";
647 case SUBLANG_SPANISH_PERU
: return "es_PE";
648 case SUBLANG_SPANISH_ARGENTINA
: return "es_AR";
649 case SUBLANG_SPANISH_ECUADOR
: return "es_EC";
650 case SUBLANG_SPANISH_CHILE
: return "es_CL";
651 case SUBLANG_SPANISH_URUGUAY
: return "es_UY";
652 case SUBLANG_SPANISH_PARAGUAY
: return "es_PY";
653 case SUBLANG_SPANISH_BOLIVIA
: return "es_BO";
654 case SUBLANG_SPANISH_EL_SALVADOR
: return "es_SV";
655 case SUBLANG_SPANISH_HONDURAS
: return "es_HN";
656 case SUBLANG_SPANISH_NICARAGUA
: return "es_NI";
657 case SUBLANG_SPANISH_PUERTO_RICO
: return "es_PR";
660 case LANG_SWAHILI
: return "sw";
664 case SUBLANG_DEFAULT
: return "sv_SE";
665 case SUBLANG_SWEDISH_FINLAND
: return "sv_FI";
669 return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
670 case LANG_TATAR
: return "tt";
671 case LANG_TELUGU
: return "te_IN";
672 case LANG_THAI
: return "th_TH";
673 case LANG_TURKISH
: return "tr_TR";
674 case LANG_UKRAINIAN
: return "uk_UA";
678 case SUBLANG_URDU_PAKISTAN
: return "ur_PK";
679 case SUBLANG_URDU_INDIA
: return "ur_IN";
685 /* FIXME: Adjust this when Uzbek locales appear on Unix. */
686 case SUBLANG_UZBEK_LATIN
: return "uz_UZ@latin";
687 case SUBLANG_UZBEK_CYRILLIC
: return "uz_UZ@cyrillic";
690 case LANG_VIETNAMESE
: return "vi_VN";