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

From blackwiki
Jump to navigation Jump to search
imported>WOSlinker
(larger doesn't work here)
imported>Gonnym
(uses lua)
 
Line 2: Line 2:
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->
 
{{Template shortcut|ISO639-1|iso639-1}}
 
{{Template shortcut|ISO639-1|iso639-1}}
 +
{{Lua|Module:ISO 639 name}}
  
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' 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 <code>iso639-3:</code> prefix, such as <code>[[iso639-3:eng]]</code>, which is available for [[ISO 639-3]] language codes.
 
'''{{NAMESPACE}}:{{BASEPAGENAME}}''' 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 <code>iso639-3:</code> prefix, such as <code>[[iso639-3:eng]]</code>, which is available for [[ISO 639-3]] language codes.

Latest revision as of 08:01, 26 August 2020

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