Primary language

Languages can be identified using a locale identifier or a primary language identifier.

This table lists the primary language identifiers.

Primary language Primary language identifier Primary language symbol
Neutral locale language 0 LANG_NEUTRAL
Afrikaans (af) 54 LANG_AFRIKAANS
Albanian (sq) 28 LANG_ALBANIAN
Alsatian (gsw) 132 LANG_ALSATIAN
Amharic (am) 94 LANG_AMHARIC
Arabic (ar) 1 LANG_ARABIC
Armenian (hy) 43 LANG_ARMENIAN
Assamese (as) 77 LANG_ASSAMESE
Azeri (az) 44 LANG_AZERI
Bashkir (ba) 109 LANG_BASHKIR
Basque (eu) 45 LANG_BASQUE
Belarusian (be) 35 LANG_BELARUSIAN
Bengali (bn) 69 LANG_BENGALI
Bosnian (bs); see Note 1 26 LANG_BOSNIAN
Breton (br) 126 LANG_BRETON
Bulgarian (bg) 2 LANG_BULGARIAN
Catalan (ca) 3 LANG_CATALAN
Chinese (zh) 4 LANG_CHINESE
Chinese (zh) 4 LANG_CHINESE_SIMPLIFIED
Corsican (co) 131 LANG_CORSICAN
Croatian (hr); see Note 1 26 LANG_CROATIAN
Croatian (hr) 26 LANG_CROATIAN
Czech (cs) 5 LANG_CZECH
Danish (da) 6 LANG_DANISH
Dari (gbz) 140 LANG_DARI
Divehi (dv) 101 LANG_DIVEHI
Dutch (nl) 19 LANG_DUTCH
English (en) 9 LANG_ENGLISH
Estonian (et) 37 LANG_ESTONIAN
Faroese (fo) 56 LANG_FAEROESE
Filipino (fil) 100 LANG_FILIPINO
Finnish (fi) 11 LANG_FINNISH
French (fr) 12 LANG_FRENCH
Frisian (fy) 98 LANG_FRISIAN
Galician (gl) 86 LANG_GALICIAN
Georgian (ka) 55 LANG_GEORGIAN
German (de) 7 LANG_GERMAN
Greek (el) 8 LANG_GREEK
Greenlandic (kl) 111 LANG_GREENLANDIC
Gujarati (gu) 71 LANG_GUJARATI
Hausa (ha) 104 LANG_HAUSA
Hebrew (he) 13 LANG_HEBREW
Hindi (hi) 57 LANG_HINDI
Hungarian (hu) 14 LANG_HUNGARIAN
Icelandic (is) 15 LANG_ICELANDIC
Igbo (ig) 112 LANG_IGBO
Indonesian (id) 33 LANG_INDONESIAN
Inuktitut (iu) 93 LANG_INUKTITUT
Irish (ga); see Note 3 60 LANG_IRISH
Italian (it) 16 LANG_ITALIAN
Japanese (ja) 17 LANG_JAPANESE
Kannada (kn) 75 LANG_KANNADA
(reserved) 96 LANG_KASHMIRI
Kazakh (kk) 63 LANG_KAZAK
Khmer (kh) 83 LANG_KHMER
K'iche (qut) 134 LANG_KICHE
Kinyarwanda (rw) 135 LANG_KINYARWANDA
Konkani (kok) 87 LANG_KONKANI
Korean (ko) 18 LANG_KOREAN
Kyrgyz (ky) 64 LANG_KYRGYZ
Lao (lo) 84 LANG_LAO
Latvian (lv) 38 LANG_LATVIAN
Lithuanian (lt) 39 LANG_LITHUANIAN
Lower Sorbian (dsb) 46 LANG_LOWER_SORBIAN
Luxembourgish (lb) 110 LANG_LUXEMBOURGISH
Macedonian (mk) 47 LANG_MACEDONIAN
Malay (ms) 62 LANG_MALAY
Malayalam (ml) 76 LANG_MALAYALAM
Maltese (mt) 58 LANG_MALTESE
Manipuri 88 LANG_MANIPURI
Maori (mi) 129 LANG_MAORI
Mapudungun (arn) 122 LANG_MAPUDUNGUN
Marathi (mr) 78 LANG_MARATHI
Mohawk (moh) 124 LANG_MOHAWK
Mongolian (mn) 80 LANG_MONGOLIAN
Nepali (ne) 97 LANG_NEPALI
Norwegian (no) 20 LANG_NORWEGIAN
Occitan (oc) 130 LANG_OCCITAN
Oriya (or) 72 LANG_ORIYA
Pashto (ps) 99 LANG_PASHTO
Persian (fa); see Note 2 41 LANG_FARSI
Polish (pl) 21 LANG_POLISH
Portuguese (pt) 22 LANG_PORTUGUESE
Punjabi (pa) 70 LANG_PUNJABI
Quechua (quz) 107 LANG_QUECHUA
Romanian (ro) 24 LANG_ROMANIAN
Romansh (rm) 23 LANG_ROMANSH
Russian (ru) 25 LANG_RUSSIAN
Sami (se) 59 LANG_SAMI
Sanskrit (sa) 79 LANG_SANSKRIT
Serbian (sb) 26 LANG_SERBIAN
Sesotho sa Leboa/Northern Sotho (ns) 108 LANG_SOTHO
Setswana/Tswana (tn) 50 LANG_TSWANA
(reserved) 89 LANG_SINDHI
Sinhala (si) 91 LANG_SINHALESE
Slovak (sk) 27 LANG_SLOVAK
Slovenian (sl) 36 LANG_SLOVENIAN
Spanish (es) 10 LANG_SPANISH
Swahili (sw) 65 LANG_SWAHILI
Swedish (sv) 29 LANG_SWEDISH
Syriac (syr) 90 LANG_SYRIAC
Tajik (tg) 40 LANG_TAJIK
Tamazight (tmz) 95 LANG_TAMAZIGHT
Tamil (ta) 73 LANG_TAMIL
Tatar (tt) 68 LANG_TATAR
Telugu (te) 74 LANG_TELUGU
Thai (th) 30 LANG_THAI
Tibetan (bo) 81 LANG_TIBETAN
(reserved) 115 LANG_TIGRIGNA
Turkish (tr) 31 LANG_TURKISH
Turkmen (tk) 66 LANG_TURKMEN
Uighur (ug) 128 LANG_UIGHUR
Ukrainian (uk) 34 LANG_UKRAINIAN
Upper Sorbian (wen) 46 LANG_UPPER_SORBIAN
Urdu (ur) 32 LANG_URDU
Uzbek (uz) 67 LANG_UZBEK
Vietnamese (vi) 42 LANG_VIETNAMESE
Welsh (cy) 82 LANG_WELSH
Wolof (wo) 136 LANG_WOLOF
Xhosa/isiXhosa (xh) 52 LANG_XHOSA
Yakut (sah) 133 LANG_YAKUT
Yi (ii) 120 LANG_YI
Yoruba (yo) 106 LANG_YORUBA
Zulu/isiZulu (zu) 53 LANG_ZULU

Notes

Note 1: Primary language identifiers for Bosnian, Croatian, and Serbian are numerically identical. For Bosnian, use LANG_BOSNIAN with SUBLANG_BOSNIAN_* sublanguage identifiers. For Croation, use LANG_CROATIAN with SUBLANG_CROATIAN_* sublanguage identifiers. For Serbian, use LANG_SERBIAN with SUBLANG_SERBIAN_* sublanguage identifiers.

Note 2: The language identifiers for Farsi and Persian are numerically identical. The constant LANG_FARSI is deprecated. Use LANG_PERSIAN instead.

Note 3: Always use the language identifier constant LANG_IRISH with SUBLANG_IRISH_IRELAND.