Difference between revisions of "Template:ISO 639-1"

From blackwiki
Jump to navigation Jump to search
imported>Primefac
m (Protected "Template:ISO 639-1": semi-protecting highly-visible templates in response to recent template-space vandalism ([Edit=Require autoconfirmed or confirmed access] (indefinite) [Move=Require autoconfirmed or confirmed access] (ind...)
imported>Gonnym
(Replaced local dataset with the one at Module:ISO 639 name, which is used in many other templates)
 
Line 1: Line 1:
<span class="plainlinks">[https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1={{#switch:{{{1|}}}
+
<span class="plainlinks">[https://www.loc.gov/standards/iso639-2/php/langcodes_name.php?iso_639_1={{#iferror:{{#invoke:ISO 639 name|iso_639_code_1_to_name|{{{1|}}}}}|<!-- error -->|{{{1|}}}}} {{{2|{{{1}}}}}}]</span><noinclude>
|aa |ab |ae |af |ak |am |an |ar |as |av |ay |az |ba |be |bg |bh |bi |bm |bn |bo |br |bs |ca |ce |ch |co |cr |cs |cu |cv |cy |da |de |dv |dz |ee |el |en |eo |es |et |eu |fa |ff |fi |fj |fo |fr |fy |ga |gd |gl |gn |gu |gv |ha |he |hi |ho |hr |ht |hu |hy |hz |ia |id |ie |ig |ii |ik |io |is |it |iu |ja |jv |ka |kg |ki |kj |kk |kl |km |kn |ko |kr |ks |ku |kv |kw |ky |la |lb |lg |li |ln |lo |lt |lu |lv |mg |mh |mi |mk |ml |mn |mr |ms |mt |my |na |nb |nd |ne |ng |nl |nn |no |nr |nv |ny |oc |oj |om |or |os |pa |pi |pl |ps |pt |qu |rm |rn |ro |ru |rw |sa |sc |sd |se |sg |si |sk |sl |sm |sn |so |sq |sr |ss |st |su |sv |sw |ta |te |tg |th |ti |tk |tl |tn |to |tr |ts |tt |tw |ty |ug |uk |ur |uz |ve |vi |vo |wa |wo |xh |yi |yo |za |zh |zu = {{{1|}}}
 
}} {{{2|{{{1}}}}}}]</span><noinclude>
 
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>

Latest revision as of 08:01, 26 August 2020

{{{1}}}

Template documentation[view] [edit] [history] [purge]

Template:ISO 639-1 displays an external link to a page for an ISO 639-1 language code at the U.S. Library of Congress ISO 639-2 Registration Authority website. It provides a function similar to the iso639-3: prefix, such as iso639-3:eng, which is available for ISO 639-3 language codes.

Usage

{{ISO 639-1|code}}
{{ISO 639-1|code|text}}

Alternative usage:

{{ISO639-1|code}}
{{ISO639-1|code|text}}
{{iso639-1|code}}
{{iso639-1|code|text}}

Examples

One parameter
Usage: {{iso639-1|en}}
Output: en

Compares to:

Usage: [[iso639-3:eng|eng]]
Output: eng
Two parameters
Usage: {{iso639-1|en|English}}
Output: English

Compares to:

Usage: [[iso639-3:eng|English]]
Output: English

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for ISO 639-1

This template displays an external link to a page for an ISO 639-1 language code at the U.S. Library of Congress ISO 639-2 Registration Authority website. It provides a function similar to the "iso639-3:" prefix, such as "iso639-3:eng", which is available for ISO 639-3 language codes.

Template parameters

ParameterDescriptionTypeStatus
ISO 639-1 code1

A valid ISO 639-1 language code.

Stringrequired
Link text2

Text to be displayed for the link. This parameter is optional; the link text defaults to the ISO 639-1 language code entered in unnamed parameter 1.

Stringoptional

See also