Difference between revisions of "Template:InterWiki/doc"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
(sandbox not in categories)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 +
{{Uses Wikidata|P424}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
  
Line 10: Line 11:
 
Where '''''lang_code''''' is the language code as described in [[:meta:Complete list of language Wikipedias available]].
 
Where '''''lang_code''''' is the language code as described in [[:meta:Complete list of language Wikipedias available]].
  
===Example===
+
===Examples===
<nowiki>===External links===</nowiki>
 
  
<nowiki> {{InterWiki|code=fr}}</nowiki>  
+
Generates boxed links to sister projects:
====External links====
+
 
{{InterWiki|code=fr}}
+
* The [[wikitext]]:
 +
<code><nowiki>{{InterWiki|code=simple|Simple English}}</nowiki></code>
 +
 
 +
: Renders the box:
 +
{{InterWiki|code=simple|Simple English}}
 +
{{clear}}
 +
 
 +
<!-- The box generated by the following wikitext states, "WikiQuote edition of Wikipedia, the free encyclopedia." This text is problematic. Please keep this hidden comment until the better solutions are documented here. Thanks, Geekdiva, Sept. 2017.
 +
* <code><nowiki>{{InterWiki|code=wikiquote|WikiQuote}}</nowiki></code>
 +
 
 +
: Renders the box: {{InterWiki|code=wikiquote|WikiQuote}}
 +
{{clear}} -->
 +
* The wikitext:
 +
<code><nowiki>==External links==</nowiki></code>
 +
 
 +
<code><nowiki> {{InterWiki|code=fr}}</nowiki></code>
 +
: Renders the second-level subheading '''External links''' followed by the box:
 +
{{InterWiki|code=fr}}{{clear}}
  
 
== See also ==
 
== See also ==
Line 22: Line 39:
 
* [[Template:ill]], for inline InterWiki links
 
* [[Template:ill]], for inline InterWiki links
  
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- CATEGORIES HERE, THANKS -->
 
<!-- CATEGORIES HERE, THANKS -->
 
[[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>

Latest revision as of 22:00, 25 April 2020

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