I18N::LangTags::List -- tags and names for human languages
use I18N::LangTags::List;
print "Parlez-vous... ", join(', ',
I18N::LangTags::List::name('elx') || 'unknown_language',
I18N::LangTags::List::name('ar-Kw') || 'unknown_language',
I18N::LangTags::List::name('en') || 'unknown_language',
I18N::LangTags::List::name('en-CA') || 'unknown_language',
), "?\n";
prints:
Parlez-vous... Elamite, Kuwait Arabic, English, Canadian English?
This module provides a function I18N::LangTags::List::name( langtag )
that takes a language tag (see I18N::LangTags) and returns the best attempt at an English name for it, or undef if it can't make sense of the tag.
The function I18N::LangTags::List::name(...) is not exported.
The map of tags-to-names that it uses is accessable as %I18N::LangTags::List::Name, and it's the same as the list that follows in this documentation, which should be useful to you even if you don't use this module.
Internet language tags, as defined in RFC 3066, are a formalism for denoting human languages. The two-letter ISO 639-1 language codes are well known (as "en" for English), as are their forms when qualified by a country code ("en-US"). Less well-known are the arbitrary-length non-ISO codes (like "i-mingo"), and the recently (in 2001) introduced three-letter ISO-639-2 codes.
Remember these important facts:
Language tags are not locale IDs. A locale ID is written with a "_" instead of a "-", (almost?) always matches m/^\w\w_\w\w\b/
, and means something different than a language tag. A language tag denotes a language. A locale ID denotes a language as used in a particular place, in combination with non-linguistic location-specific information such as what currency is used there. Locales also often denote character set information, as in "en_US.ISO8859-1".
Language tags are not for computer languages.
"Dialect" is not a useful term, since there is no objective criterion for establishing when two language-forms are dialects of eachother, or are separate languages.
Language tags are not case-sensitive. en-US, en-us, En-Us, etc., are all the same tag, and denote the same language.
Not every language tag really refers to a single language. Some language tags refer to conditions: i-default (system-message text in English plus maybe other languages), und (undetermined language). Others (notably lots of the three-letter codes) are bibliographic tags that classify whole groups of languages, as with cus "Cushitic (Other)" (i.e., a language that has been classed as Cushtic, but which has no more specific code) or the even less linguistically coherent sai for "South American Indian (Other)". Though useful in bibliography, SUCH TAGS ARE NOT FOR GENERAL USE. For further guidance, email me.
Language tags are not country codes. In fact, they are often distinct codes, as with language tag ja for Japanese, and ISO 3166 country code .jp
for Japan.
The first part of each item is the language tag, between {...}. It is followed by an English name for the language or language-group. Language tags that I judge to be not for general use, are bracketed.
This list is in alphabetical order by English name of the language.
eq Abkhaz
(Artificial)
(Historical)
NOT Algonquin!
NOT Aramaic!
eq Amis. eq 'Amis. eq Pangca.
Many forms are mutually un-intelligible in spoken media. Notable forms: {ar-ae} UAE Arabic; {ar-bh} Bahrain Arabic; {ar-dz} Algerian Arabic; {ar-eg} Egyptian Arabic; {ar-iq} Iraqi Arabic; {ar-jo} Jordanian Arabic; {ar-kw} Kuwait Arabic; {ar-lb} Lebanese Arabic; {ar-ly} Libyan Arabic; {ar-ma} Moroccan Arabic; {ar-om} Omani Arabic; {ar-qa} Qatari Arabic; {ar-sa} Sauda Arabic; {ar-sy} Syrian Arabic; {ar-tn} Tunisian Arabic; {ar-ye} Yemen Arabic.
NOT Amharic! NOT Samaritan Aramaic!
eq Athabaskan. eq Athapaskan. eq Athabascan.
eq Zend
eq Azeri
eq Belarussian. eq Byelarussian. eq Belorussian. eq Byelorussian. eq White Russian. eq White Ruthenian. NOT Ruthenian!
eq Bangla.
eq Bichelamar.
eq Catalán. eq Catalonian.
Notable forms: {cel-gaulish} Gaulish (Historical)
(Historical?)
eq Tsalagi
(Historical) NOT Chibchan (which is a language family).
eq Nyanja. eq Chinyanja.
Many forms are mutually un-intelligible in spoken media. Notable subforms: {zh-cn} PRC Chinese; {zh-hk} Hong Kong Chinese; {zh-mo} Macau Chinese; {zh-sg} Singapore Chinese; {zh-tw} Taiwan Chinese; {zh-guoyu} Mandarin [Putonghua/Guoyu]; {zh-hakka} Hakka [formerly i-hakka]; {zh-min} Hokkien; {zh-min-nan} Southern Hokkien; {zh-wuu} Shanghaiese; {zh-xiang} Hunanese; {zh-gan} Gan; {zh-yue} Cantonese.
eq Chinook Wawa.
eq Old Church Slavonic.
eq Trukese. eq Chuuk. eq Truk. eq Ruk.
eq Corse.
NOT Creek!
NOT Cree!
eq Croat.
eq Nakota. eq Latoka.
Defined in RFC 2277, this is for tagging text (which must include English text, and might/should include text in other appropriate languages) that is emitted in a context where language-negotiation wasn't possible -- in SMTP mail failure messages, for example.
NOT Dogrib!
NOT Dogri!
eq Netherlander. Notable forms: {nl-nl} Netherlands Dutch; {nl-be} Belgian Dutch.
(Historical)
(Historical)
(Historical)
Notable forms: {en-au} Australian English; {en-bz} Belize English; {en-ca} Canadian English; {en-gb} UK English; {en-ie} Irish English; {en-jm} Jamaican English; {en-nz} New Zealand English; {en-ph} Philippine English; {en-tt} Trinidad English; {en-us} US English; {en-za} South African English; {en-zw} Zimbabwe English.
(Historical)
eq Anglo-Saxon. (Historical)
(Artificial)
eq Finno-Ugric. NOT Ugaritic!
Notable forms: {fr-fr} France French; {fr-be} Belgian French; {fr-ca} Canadian French; {fr-ch} Swiss French; {fr-lu} Luxembourg French; {fr-mc} Monaco French.
(Historical)
(Historical)
NOT Scots!
eq Galician
eq Ge'ez
Notable forms: {de-at} Austrian German; {de-be} Belgian German; {de-ch} Swiss German; {de-de} Germany German; {de-li} Liechtenstein German; {de-lu} Luxembourg German.
(Historical)
(Historical)
(Historical)
(Historical) (Until 15th century or so.)
(Since 15th century or so.)
Guaraní
eq Gwichin
Hawai'ian
(Formerly "iw".)
(Historical)
(Formerly "in".)
(Artificial) NOT Interlingue!
(Artificial) NOT Interlingua!
A subform of "Eskimo".
A subform of "Eskimo".
(Historical)
(Historical)
Notable forms: {it-it} Italy Italian; {it-ch} Swiss Italian.
(NOT "jp"!)
eq Greenlandic "Eskimo"
eq Kanarese. NOT Canadian!
eq Cambodian. eq Kampuchean.
eq Gikuyu.
eq Judeo-Spanish. NOT Ladin (a minority language in Italy).
NOT Lamba!
NOT Lahnda!
eq Laotian.
(Historical) NOT Ladin! NOT Ladino!
eq Lettish.
eq Luxemburgian, eq Luxemburger. (Formerly i-lux.)
eq Low Saxon. eq Low German. eq Low Saxon.
eq Luiseño.
eq the modern Slavic language spoken in what was Yugoslavia. NOT the form of Greek spoken in Greek Macedonia!
NOT Malayalam!
NOT Malay!
NOT Mandarin!
eq Meithei.
NOT Mari!
NOT Maori!
eq Marshallese.
eq the Irquoian language West Virginia Seneca. NOT New York Seneca!
Don't use this.
eq Moldovan.
eq Mongol.
Not for normal use.
eq Navaho. (Formerly i-navajo.)
eq Nepalese. Notable forms: {ne-np} Nepal Nepali; {ne-in} India Nepali.
(Historical)
Do not use this.
eq Lappish. eq Lapp. eq (Northern) Saami.
Note the two following forms:
eq Bokmål, (A form of Norwegian.) (Formerly no-bok.)
(A form of Norwegian.) (Formerly no-nyn.)
eq Provençal, eq Provencal
eq Ojibwe.
Group of languages collectively called "Otomí".
eq Pahlevi
eq Pariwan
(Historical?)
eq Punjabi
eq Papiamentu.
eq Farsi. eq Iranian.
(Historical)
NOT Pompeiian!
eq Portugese. Notable forms: {pt-pt} Portugal Portuguese; {pt-br} Brazilian Portuguese.
eq Old Provençal. (Historical.)
eq Pashto. eq Pushtu.
eq Quecha.
eq Romansh.
NOT Romanian! NOT Romany! NOT Romansh!
eq Rumanian. NOT Romany!
eq Rom. NOT Romanian!
NOT White Russian! NOT Rusyn!
Large language group.
NOT Aramaic!
(Historical)
eq Sard.
NOT Scots Gaelic!
eq Serb. NOT Sorbian.
Always use with a subtag. Notable forms: {sgn-gb} British Sign Language (BSL); {sgn-ie} Irish Sign Language (ESL); {sgn-ni} Nicaraguan Sign Language (ISN); {sgn-us} American Sign Language (ASL).
eq Blackfoot. eq Pikanii.
eq Sinhala.
("Slavey" is a subform.)
eq Slovakian.
eq Slovene.
eq Wendish. eq Sorb. eq Lusatian. eq Wend. NOT Venda! NOT Serbian!
eq Sutu. eq Sesotho.
Notable forms: {es-ar} Argentine Spanish; {es-bo} Bolivian Spanish; {es-cl} Chilean Spanish; {es-co} Colombian Spanish; {es-do} Dominican Spanish; {es-ec} Ecuadorian Spanish; {es-es} Spain Spanish; {es-gt} Guatemalan Spanish; {es-hn} Honduran Spanish; {es-mx} Mexican Spanish; {es-pa} Panamanian Spanish; {es-pe} Peruvian Spanish; {es-pr} Puerto Rican Spanish; {es-py} Paraguay Spanish; {es-sv} Salvadoran Spanish; {es-us} US Spanish; {es-uy} Uruguayan Spanish; {es-ve} Venezuelan Spanish.
(Historical)
eq Kiswahili
Notable forms: {sv-se} Sweden Swedish; {sv-fi} Finland Swedish.
NOT Thai!
eq Yami.
eq Atayal. eq Atayan.
NOT Tai!
eq Themne. eq Timene.
NOT Tsonga!
(Pronounced "Tong-a", not "Tong-ga")
NOT Tsonga!
eq Sm'algyax
NOT Tonga!
Same as Setswana.
(Typically in Roman script)
(Typically in Arabic script) (Historical)
eq Turkmeni.
eq Tuvan. eq Tuvin.
NOT Ugric!
Not a tag for normal use.
eq Özbek
NOT Wendish! NOT Wend! NOT Avestan!
eq Viet.
eq Volapük. (Artificial)
eq Votian. eq Vod.
eq Wolaytta.
Presumably the Philippine language Waray-Waray (Samareño), not the smaller Philippine language Waray Sorsogon, nor the extinct Australian language Waray.
eq Washoe
"x-" is a prefix for language tags that are not registered with ISO or IANA. Example, x-double-dutch
(The Yao in Malawi?)
eq Yap
Formerly "ji". Sometimes in Roman script, sometimes in Hebrew script.
Several "Eskimo" languages.
(A group of languages.)
NOT Zend.
eq Zuñi
I18N::LangTags and its "See Also" section.
Copyright (c) 2001,2002 Sean M. Burke. All rights reserved.
You can redistribute and/or modify this document under the same terms as Perl itself.
This document is provided in the hope that it will be useful, but without any warranty; without even the implied warranty of accuracy, authoritativeness, completeness, merchantability, or fitness for a particular purpose.
Email any corrections or questions to me.
Sean M. Burke, sburke@cpan.org