Difference between revisions of "Template:InterWiki/doc"

From blackwiki
Jump to navigation Jump to search
imported>JoeHebda
(Add: example for sister projects)
imported>Geekdiva
m (Improved the Examples section, but had to comment out one example for now. See hidden comment.)
Line 13: Line 13:
 
===Examples===
 
===Examples===
  
Links to sister projects:
+
Generates boxed links to sister projects:
  
<nowiki>{{InterWiki|code=simple|Simple English}}</nowiki>
+
* The [[wikitext]]:
 
+
<code><nowiki>{{InterWiki|code=simple|Simple English}}</nowiki></code>
<nowiki>{{InterWiki|code=wikiquote|WikiQuote}}</nowiki>
 
  
 +
: Renders the box:
 
{{InterWiki|code=simple|Simple English}}
 
{{InterWiki|code=simple|Simple English}}
{{InterWiki|code=wikiquote|WikiQuote}}
 
 
{{clear}}
 
{{clear}}
  
<nowiki>===External links===</nowiki>  
+
<!-- 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>  
  
<nowiki> {{InterWiki|code=fr}}</nowiki>  
+
<code><nowiki> {{InterWiki|code=fr}}</nowiki></code>  
====External links====
+
: Renders the second-level subheading '''External links''' followed by the box:
{{InterWiki|code=fr}}
+
{{InterWiki|code=fr}}{{clear}}
  
 
== See also ==
 
== See also ==

Revision as of 22:11, 4 September 2017

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