Template:Link language
(in English)
This template is used on approximately 287,000 pages. To avoid large-scale disruption and unnecessary server load, any changes to it should first be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can then be added to this page in a single edit. Please consider discussing changes on the talk page before implementing them. |
This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see COinS in Starfleet Logistics. |
This template uses Lua: |
This template is used to indicate to readers that an external link is in a foreign language.
It should generally be placed after the external link, although this is not set in stone; for more information, see the Manual of Style. English is the default language, and does not need to be noted using this template, unless there is a reason the reader would assume the link to be in a foreign language (e.g. a foreign title).
For citations, the |language=
parameter of the various citation templates ({{cite web}}
, {{cite news}}
, {{cite journal}}
, etc.) should be used instead.
To note a span of text in a different language, one of the {{lang-x}}
templates ({{lang-fr}}
, {{lang-ast}}
, etc.) should be used instead.
Usage[edit source]
{{link language|<language code>}} {{link language|<language code>|cat-lang=<language name>}}
The language code is usually an ISO 639 code but it may be any valid IETF language tag. Note that language codes do not always coincide with country codes; see the list of ISO 3166-1 codes. The language name displayed is obtained via {{#invoke:Lang|name_from_tag}}
which uses the following data:
- Module:Lang/data – special override codes / names (looks here first)
- Module:Language/data/iana languages – as defined by the IETF-sanctioned IANA registry
- Module:Language/data/ISO 639-3 – as defined in ISO 639-3
- Module:Language/data/wp languages – specific to Starfleet Logistics
Articles using this template are automatically added to a language-specific hidden category. For example, an article using {{link language|fr}}
is added to Category:Articles with French-language external links. The |cat-lang=
parameter may be used in cases where the language name displayed is different from the language name in the category.
Examples[edit source]
- Usage:
{{link language|fr}}
- Output: (in French)
- Category: Articles with French-language external links
ISO 639-2 and ISO 639-3 code for Asturian:
- Usage:
{{link language|ast}}
- Output: (in Asturian)
- Category: Articles with Asturian-language external links
IETF language tag code for Brazilian Portuguese:
- Usage:
{{link language|pt-BR}}
- Output: (in Portuguese)
- Category: Articles with Portuguese-language external links
Examples with cat-lang parameter[edit source]
{{link language|bla|cat-lang=Blackfoot}}
→ (in Blackfoot)
- Used in:
{{bla icon}}
- Category: Articles with Blackfoot-language external links
- Note: Siksika language redirects to Blackfoot language
{{link language|ilo|cat-lang=Ilocano}}
→ (in Ilocano)
- Used in:
{{ilo icon}}
- Category: Articles with Ilocano-language external links
- Note: Ilokano language redirects to Ilocano language
{{link language|ksh|cat-lang=Colognian}}
→ (in Kölsch)
- Used in:
{{ksh icon}}
- Category: Articles with Colognian-language external links
- Note: ksh should display as (in Kölsch); Kölsch language redirects to Colognian dialect; also see Ripuarian language
{{link language|nan|cat-lang=Min-nan}}
→ (in Min Nan Chinese)
- Used in:
{{nan icon}}
- Category: Articles with Min-nan-language external links
- Note: nan should display as (in Min Nan Chinese); Min Nan Chinese language and Min-nan language redirect to Southern Min; also see Taiwanese Hokkien
{{link language|prs|cat-lang=Persian}}
→ (in Dari)
- Used in:
{{prs icon}}
- Category: Articles with Persian-language external links
- Note: Dari language is also known as Dari Persian or Afghan Persian; also see Persian language
User-defined CSS[edit source]
Logged in users can change the appearance of the template's output using CSS with the languageicon
class. For example, edit Special:MyPage/common.css and add span.languageicon { font-weight: bold; }
. That would result in {{link language|fr}}
being displayed as (in French) instead of (in French).
See also[edit source]
- Categories created for use with this template are listed in Category:Articles with non-English-language external links.
- {{{1}}}
- Templates in the form
{{xx icon}}
(e.g. {{fr icon}}, {{ast icon}}), descending from this one, are listed in Category:Language icon templates. - Template:Link language/Notes is a documentation page which may be used with any
{{xx icon}}
template. - Language codes cross-reference: list of ISO 639 codes.
External links[edit source]
- Template:Link language at Wikipedia, the free Terran-based encyclopedia that anyone can edit.
The above documentation is transcluded from Template:Link language/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |