Difference between revisions of "Template:InterWiki"
Jump to navigation
Jump to search
imported>Tamzin (use #language parsing of the specified code, instead of the {{PAGENAME}}, if no {{{1}}} is specified. (really, {{{1}}} should been an alias for {{{code}}}, with {{{2}}} as display text... but too late to change that now)) |
imported>Tamzin (actually, let's keep {{PAGENAME}} in as a secondary default in case something goes wrong with #language) |
||
| Line 1: | Line 1: | ||
{{sister | {{sister | ||
|project=wikipedia | |project=wikipedia | ||
| − | |text='''''[[:{{{code}}}:| {{{1| {{#if:{{{code|}}} | {{#language:{{{code}}}|en}} }} }}} edition]]''''' of [[Wikipedia]], the free encyclopedia | + | |text='''''[[:{{{code}}}:| {{{1|{{#if:{{{code|}}} |
| + | |{{#ifeq:{{#language:{{{code}}}|en}}|{{{code}}}<!-- if an invalid or unsupported code is specified, #language just returns the same thing that was input --> | ||
| + | |{{Title without disambig|{{PAGENAME}}}} | ||
| + | |{{#language:{{{code}}}|en}} | ||
| + | }} | ||
| + | }} }}} edition]]''''' of [[Wikipedia]], the free encyclopedia | ||
}}<noinclude> | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Revision as of 22:52, 13 July 2013
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
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:
- The wikitext:
{{InterWiki|code=simple|Simple English}}
- Renders the box:
- The wikitext:
==External links==
{{InterWiki|code=fr}}
- Renders the second-level subheading External links followed by the box:
See also
- Template:WikisourceWiki (for similarly linking to Wikisource)
- Help:Interwiki linking
- Template:ill, for inline InterWiki links
No description.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Language code | code | The language code for the language of the Wikipedia being linked
| String | required |
| Language label | 1 article | The label to use for the link to Wikipedia in that Language
| Unknown | optional |
| The above documentation is transcluded from Template:InterWiki/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |