Difference between revisions of "Template:InterWiki/doc"

From blackwiki
Jump to navigation Jump to search
imported>Geekdiva
m (Improved the Examples section, but had to comment out one example for now. See hidden comment.)
imported>Daviddwd
Line 43: Line 43:
 
[[Category:Interwiki link templates|{{PAGENAME}}]]
 
[[Category:Interwiki link templates|{{PAGENAME}}]]
 
}}</includeonly>
 
}}</includeonly>
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"aliases": [
 +
"article"
 +
],
 +
"label": "Language label",
 +
"description": "The label to use for the link to Wikipedia in that Language",
 +
"example": "Simple English"
 +
},
 +
"code": {
 +
"label": "Language code",
 +
"description": "The language code for the language of the Wikipedia being linked",
 +
"example": "es (Spanish), zh (Chinese)",
 +
"type": "string",
 +
"required": true
 +
}
 +
},
 +
"paramOrder": [
 +
"code",
 +
"1"
 +
]
 +
}
 +
</templatedata>

Revision as of 00:54, 5 December 2018

Template:Uses Wikidata

Purpose

This template allows you to add a link from the en.wikipedia article on a language to the Wikipedia project in that language. Just add the following code to the language article in the External links section, just before the first link:

{{InterWiki|code=lang_code}}

Where lang_code is the language code as described in meta:Complete list of language Wikipedias available.

Examples

Generates boxed links to sister projects:

{{InterWiki|code=simple|Simple English}}

Renders the box:

Template:Sister project

  • The wikitext:

==External links==

{{InterWiki|code=fr}}

Renders the second-level subheading External links followed by the box:

Template:Sister project

See also


No description.

Template parameters

ParameterDescriptionTypeStatus
Language codecode

The language code for the language of the Wikipedia being linked

Example
es (Spanish), zh (Chinese)
Stringrequired
Language label1 article

The label to use for the link to Wikipedia in that Language

Example
Simple English
Unknownoptional