Misplaced Pages

Template:ISO 639 name: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 14:26, 28 April 2009 view sourceXeno (talk | contribs)Autopatrolled, Bureaucrats, Administrators103,385 edits failure notice, feel free to rv or tweak← Previous edit Latest revision as of 18:26, 29 August 2020 view source Trappist the monk (talk | contribs)Administrators479,680 editsm not the sandbox; 
(42 intermediate revisions by 12 users not shown)
Line 1: Line 1:
<includeonly>{{safesubst:<noinclude />#invoke:ISO 639 name|{{{fn|iso_639_code_to_name}}}}}</includeonly><noinclude>
{{#switch:{{{1|}}}
|aa|aar=Afar
|ab|abk=Abkhaz
|ae|ave=Avestan
|af|afr=Afrikaans
|ak|aka=Akan
|alb=Albanian
|am|amh=Amharic
|an|arg=Aragonese
|ar|ara=Arabic
|as|asm=Assamese
|av|ava=Avar
|ay|aym=Aymara
|az|aze=Azerbaijani
|ba|bak=Bashkir
|be|bel=Belarusian
|bg|bul=Bulgarian
|bh|bih=Bihari
|bi|bis=Bislama
|bm|bam=Bambara
|bn|ben=Bengali
|bo|tib|bod=Tibetan
|br|bre=Breton
|bs|bos=Bosnian
|ca|cat=Catalan
|ce|che=Chechen
|ch|cha=Chamorro
|co|cos=Corsican
|cr|cre=Cree
|cs|cze|ces=Czech
|cu|chu=Old Church Slavonic
|cv|chv=Chuvash
|cy|wel|cym=Welsh
|da|dan=Danish
|de|ger|deu=German
|dv|div=Dhivehi
|dz|dzo=Dzongkha
|ee|ewe=Ewe
|el|gre|ell=Greek
|en|eng=English
|eo|epo=Esperanto
|es|spa=Spanish
|et|est=Estonian
|eu|baq|eus=Basque
|fa|per|fas=Persian
|ff|ful=Fula
|fi|fin=Finnish
|fj|fij=Fijian
|fo|fao=Faroese
|fr|fre|fra=French
|fy|fry=West Frisian
|ga|gle=Irish
|gd|gla=Scottish Gaelic
|gl|glg=Galician language
|gn|grn=Guaraní
|gu|guj=Gujarati
|gv|glv=Manx
|ha|hau=Hausa
|he|heb=Hebrew
|hi|hin=Hindi
|ho|hmo=Hiri Motu
|hr|scr|hrv=Croatian
|ht|hat=Haitian Creole
|hu|hun=Hungarian
|hy|arm|hye=Armenian
|hz|her=Herero
|ia|ina=Interlingua
|id|ind=Indonesian
|ie|ile=Interlingue
|ig|ibo=Igbo
|ii|iii=Yi
|ik|ipk=Inupiaq
|io|ido=Ido
|is|ice|isl=Icelandic
|it|ita=Italian
|iu|iku=Inuktitut
|ja|jpn=Japanese
|jv|jav=Javanese
|ka|geo|kat=Georgian
|kg|kon=Kongo
|ki|kik=Gikuyu
|kj|kua=Kwanyama
|kk|kaz=Kazakh
|kl|kal=Kalaallisut
|km|khm=Khmer
|kn|kan=Kannada
|ko|kor=Korean
|kr|kau=Kanuri
|ks|kas=Kashmiri
|ku|kur=Kurdish
|kv|kom=Komi
|kw|cor=Cornish
|ky|kir=Kyrgyz
|la|lat=Latin
|lb|ltz=Luxembourgish
|lg|lug=Luganda
|li|lim=Limburgish
|ln|lin=Lingala
|lo|lao=Lao
|lt|lit=Lithuanian
|lu|lub=Tshiluba
|lv|lav=Latvian
|mg|mlg=Malagasy
|mh|mah=Marshallese
|mi|mao|mri=Māori
|mk|mac|mkd=Macedonian
|ml|mal=Malayalam
|mn|mon=Mongolian
|mr|mar=Marathi
|ms|may|msa=Malay
|mt|mlt=Maltese
|my|bur|mya=Burmese
|na|nau=Nauruan
|nb|nob=Bokmål
|nd|nde=North Ndebele
|ne|nep=Nepali
|ng|ndo=Ndonga
|nl|dut|nld=Dutch
|nn|nno=Nynorsk
|no|nor=Norwegian
|nr|nbl=Southern Ndebele
|nv|nav=Navajo
|ny|nya=Chichewa
|oc|oci=Occitan
|oj|oji=Anishinaabe
|om|orm=Oromo
|or|ori=Oriya
|os|oss=Ossetic
|pa|pan=Punjabi
|pi|pli=Pāli
|pl|pol=Polish
|ps|pus=Pashto
|pt|por=Portuguese
|qu|que=Quechua
|rm|roh=Romansh
|rn|run=Kirundi
|ro|rum|ron=Romanian
|ru|rus=Russian
|rw|kin=Kinyarwanda
|sa|san=Sanskrit
|sc|srd=Sardinian
|sd|snd=Sindhi
|se|sme=Northern Sami
|sg|sag=Sango
|sh|hbs=Serbo-Croatian
|si|sin=Sinhala
|sk|slo|slk=Slovak
|sl|slv=Slovenian
|sm|smo=Samoan
|sn|sna=Shona
|so|som=Somali
|sq|alb|sqi=Albanian
|sr|scc|srp=Serbian
|ss|ssw=Swati
|st|sot=Sotho
|su|sun=Sundanese
|sv|swe=Swedish
|sw|swa=Swahili
|ta|tam=Tamil
|te|tel=Telugu
|tg|tgk=Tajik
|th|tha=Thai
|ti|tir=Tigrinya
|tk|tuk=Turkmen
|tl|tgl=Tagalog
|tn|tsn=Tswana
|to|ton=Tongan
|tr|tur=Turkish
|ts|tso=Tsonga
|tt|tat=Tatar
|tw|twi=Twi
|ty|tah=Tahitian
|ug|uig=Uyghur
|uk|ukr=Ukrainian
|ur|urd=Urdu
|uz|uzb=Uzbek
|ve|ven=Venda
|vi|vie=Vietnamese
|vo|vol=Volapük
|wa|wln=Walloon
|wo|wol=Wolof
|xh|xho=Xhosa
|yi|yid=Yiddish
|yo|yor=Yoruba
|za|zha=Zhuang
|zh|chi|zho=Chinese
|zu|zul=Zulu
|#default=<font color="red">'''Language abbreviation not recognized by ]!'''</font>
}}<noinclude>
{{Documentation}} {{Documentation}}
</noinclude> </noinclude>

Latest revision as of 18:26, 29 August 2020

Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 8,900 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
Language templates
Language names (ISO 639)
Interwiki links
Foreign-language text
Other

Usage

The {{ISO 639 name}} template is used to resolve ISO 639-1, ISO 639-2, ISO 639-3 and ISO 639-5 codes to language names. It will trim extraneous IETF language tags to just the ISO 639 code. E.g.: Sanskrit in Latin script, which IETF language tag is sa-Latn, renders as:

  • {{ISO 639 name|sa-Latn}} → Sanskrit error: sa-Latn is an IETF tag (help)

The error message can be suppressed with |hide-err=yes:

  • {{ISO 639 name|sa-Latn|hide-err=yes}} → Sanskrit

The rendered language name can be linked to the appropriate language article with |link=yes:

  • {{ISO 639 name|sa-Latn|hide-err=yes|link=yes}}Sanskrit

When linking, an alternate link label can be provided with |label=<label text>:

  • {{ISO 639 name|sa-Latn|hide-err=yes|link=yes|label=sa-Latn}}sa-Latn

The {{ISO 639 name link}} template is the same as {{ISO 639 name}} except that it presets |link=yes.

Both of these templates can be safely substituted.

Other functions

This template can be used to execute any of the functions exported by Module:ISO 639 name. These function are:

  • iso_639_code_exists – returns true if <code> is found in any of the ISO 639 data tables
  • iso_639_code_to_name – (default) as described above
  • iso_639_code_1_to_name – same as iso_639_code_to_name except constrained to the ISO 639-1 data table
  • iso_639_code_2_to_name – same as iso_639_code_to_name except constrained to the ISO 639-2 data table
  • iso_639_code_2B_to_name – same as iso_639_code_to_name except constrained to the ISO 639-2B data table
  • iso_639_code_3_to_name – same as iso_639_code_to_name except constrained to the ISO 639-3 data table
  • iso_639_code_5_to_name – same as iso_639_code_to_name except constrained to the ISO 639-5 data table
  • iso_639_name_exists – returns true if <name> is found in any of the ISO 639 data tables
  • iso_639_name_to_code – returns language code associated with <name>; may be constrained to a particular ISO 639 data table
  • iso_639 – returns language name when given a valid language code; returns a language code when given a valid language name; may be constrained to a particular ISO 639 data table

To use these functions set |fn= to the appropriate function name.

Language codes

ISO 639-1 codes and matching codes from ISO 639-2, -2B, and -3
ISO 639-1 ISO 639-2 ISO 639-2B ISO 639-3 Name Article
aa aar aar Afar Afar
ab abk abk Abkhazian Abkhazian
ae ave ave Avestan Avestan
af afr afr Afrikaans Afrikaans
ak aka aka Akan Akan
am amh amh Amharic Amharic
an arg arg Aragonese Aragonese
ar ara ara Arabic Arabic
as asm asm Assamese Assamese
av ava ava Avaric Avaric
ay aym aym Aymara Aymara
az aze aze Azerbaijani Azerbaijani
ba bak bak Bashkir Bashkir
be bel bel Belarusian Belarusian
bg bul bul Bulgarian Bulgarian
bh bih Bihari languages Bihari languages
bi bis bis Bislama Bislama
bm bam bam Bambara Bambara
bn ben ben Bengali Bengali
bo bod tib bod Standard Tibetan Standard Tibetan
br bre bre Breton Breton
bs bos bos Bosnian Bosnian
ca cat cat Catalan Catalan
ce che che Chechen Chechen
ch cha cha Chamorro Chamorro
co cos cos Corsican Corsican
cr cre cre Cree Cree
cs ces cze ces Czech Czech
cu chu chu Church Slavic Church Slavic
cv chv chv Chuvash Chuvash
cy cym wel cym Welsh Welsh
da dan dan Danish Danish
de deu ger deu German German
dv div div Dhivehi Dhivehi
dz dzo dzo Dzongkha Dzongkha
ee ewe ewe Ewe Ewe
el ell gre ell Greek Greek
en eng eng English English
eo epo epo Esperanto Esperanto
es spa spa Spanish Spanish
et est est Estonian Estonian
eu eus baq eus Basque Basque
fa fas per fas Persian Persian
ff ful ful Fulah Fulah
fi fin fin Finnish Finnish
fj fij fij Fijian Fijian
fo fao fao Faroese Faroese
fr fra fre fra French French
fy fry fry Western Frisian Western Frisian
ga gle gle Irish Irish
gd gla gla Scottish Gaelic Scottish Gaelic
gl glg glg Galician Galician
gn grn grn Guarani Guarani
gu guj guj Gujarati Gujarati
gv glv glv Manx Manx
ha hau hau Hausa Hausa
he heb heb Hebrew Hebrew
hi hin hin Hindi Hindi
ho hmo hmo Hiri Motu Hiri Motu
hr hrv scr hrv Croatian Croatian
ht hat hat Haitian Creole Haitian Creole
hu hun hun Hungarian Hungarian
hy hye arm hye Armenian Armenian
hz her her Herero Herero
ia ina ina Interlingua Interlingua
id ind ind Indonesian Indonesian
ie ile ile Interlingue Interlingue
ig ibo ibo Igbo Igbo
ii iii iii Sichuan Yi Sichuan Yi
ik ipk ipk Inupiaq Inupiaq
io ido ido Ido Ido
is isl ice isl Icelandic Icelandic
it ita ita Italian Italian
iu iku iku Inuktitut Inuktitut
ja jpn jpn Japanese Japanese
jv jav jaw jav Javanese Javanese
ka kat geo kat Georgian Georgian
kg kon kon Kongo Kongo
ki kik kik Kikuyu Kikuyu
kj kua kua Kuanyama Kuanyama
kk kaz kaz Kazakh Kazakh
kl kal kal Kalaallisut Kalaallisut
km khm khm Khmer Khmer
kn kan kan Kannada Kannada
ko kor kor Korean Korean
kr kau kau Kanuri Kanuri
ks kas kas Kashmiri Kashmiri
ku kur kur Kurdish Kurdish
kv kom kom Komi Komi
kw cor cor Cornish Cornish
ky kir kir Kirghiz Kirghiz
la lat lat Latin Latin
lb ltz ltz Luxembourgish Luxembourgish
lg lug lug Ganda Ganda
li lim lim Limburgan Limburgan
ln lin lin Lingala Lingala
lo lao lao Lao Lao
lt lit lit Lithuanian Lithuanian
lu lub lub Luba-Katanga Luba-Katanga
lv lav lav Latvian Latvian
mg mlg mlg Malagasy Malagasy
mh mah mah Marshallese Marshallese
mi mri mao mri Maori Maori
mk mkd mac mkd Macedonian Macedonian
ml mal mal Malayalam Malayalam
mn mon mon Mongolian Mongolian
mr mar mar Marathi Marathi
ms msa may msa Malay Malay
mt mlt mlt Maltese Maltese
my mya bur mya Burmese Burmese
na nau nau Nauru Nauru
nb nob nob Norwegian Bokmål Norwegian Bokmål
nd nde nde North Ndebele North Ndebele
ne nep nep Nepali Nepali
ng ndo ndo Ndonga Ndonga
nl nld dut nld Dutch Dutch
nn nno nno Norwegian Nynorsk Norwegian Nynorsk
no nor nor Norwegian Norwegian
nr nbl nbl South Ndebele South Ndebele
nv nav nav Navajo Navajo
ny nya nya Nyanja Nyanja
oc oci oci Occitan Occitan
oj oji oji Ojibwa Ojibwa
om orm orm Oromo Oromo
or ori ori Oriya Oriya
os oss oss Ossetian Ossetian
pa pan pan Panjabi Panjabi
pi pli pli Pali Pali
pl pol pol Polish Polish
ps pus pus Pushto Pushto
pt por por Portuguese Portuguese
qu que que Quechua Quechua
rm roh roh Romansh Romansh
rn run run Rundi Rundi
ro ron rum ron Romanian Romanian
ru rus rus Russian Russian
rw kin kin Kinyarwanda Kinyarwanda
sa san san Sanskrit Sanskrit
sc srd srd Sardinian Sardinian
sd snd snd Sindhi Sindhi
se sme sme Northern Sami Northern Sami
sg sag sag Sango Sango
sh hbs Serbo-Croatian Serbo-Croatian
si sin sin Sinhala Sinhala
sk slk slo slk Slovak Slovak
sl slv slv Slovenian Slovenian
sm smo smo Samoan Samoan
sn sna sna Shona Shona
so som som Somali Somali
sq sqi alb sqi Albanian Albanian
sr srp scc srp Serbian Serbian
ss ssw ssw Swati Swati
st sot sot Sotho Sotho
su sun sun Sundanese Sundanese
sv swe swe Swedish Swedish
sw swa swa Swahili Swahili
ta tam tam Tamil Tamil
te tel tel Telugu Telugu
tg tgk tgk Tajik Tajik
th tha tha Thai Thai
ti tir tir Tigrinya Tigrinya
tk tuk tuk Turkmen Turkmen
tl tgl tgl Tagalog Tagalog
tn tsn tsn Tswana Tswana
to ton ton Tongan Tongan
tr tur tur Turkish Turkish
ts tso tso Tsonga Tsonga
tt tat tat Tatar Tatar
tw twi twi Twi Twi
ty tah tah Tahitian Tahitian
ug uig uig Uighur Uighur
uk ukr ukr Ukrainian Ukrainian
ur urd urd Urdu Urdu
uz uzb uzb Uzbek Uzbek
ve ven ven Venda Venda
vi vie vie Vietnamese Vietnamese
vo vol vol Volapük Volapük
wa wln wln Walloon Walloon
wo wol wol Wolof Wolof
xh xho xho Xhosa Xhosa
yi yid yid Yiddish Yiddish
yo yor yor Yoruba Yoruba
za zha zha Zhuang Zhuang
zh zho chi zho Chinese Chinese
zu zul zul Zulu Zulu

Notes

  1. There are only 20 ISO 639-2B codes.
  2. ^ Code not assigned.

Examples

  • {{ISO 639 name|en}} gives English
  • {{ISO 639 name|fr}} gives French

Error messages

This template produces error messages. These messages are:

  • <code> is an IETF tag – IETF language tags are not ISO 639 language codes. When these tags are encountered, the template attempts to render the correct language and also emits this error message
  • ISO 639-<part> code is required – where <part> is 1, 2, 3, 5; template was called without the required language code
  • <code> is not an ISO 639-<part> code – <code> fails simple length validation; 639 part 1, language codes are two characters, for 639 parts 2, 3, and 5, language codes are three characters
  • <code> not found in ISO 639-<part> list – <code> not found after searching ISO 639-<part> data

The module that does the work for this template has other functionality not supported by this template. See Module:ISO 639 name. Error messages related to that other functionality are:

  • language name required – module function iso_639_name_to_code() only – this message emitted when a language name is not provided in the {{#invoke:}}
  • <part> not an ISO 639 part – module functions iso_639_name_to_code() and iso_639() only – this message emitted when <part> is not one of 1, 2, 3, or 5
  • language code or name required – module function iso_639() only – this message emitted when a language name or a language code is not provided in the {{#invoke:}}

Tracking categories

See also

The above documentation is transcluded from Template:ISO 639 name/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template. Category: