Difference between revisions of "Template:Interlanguage link forced/doc"

From blackwiki
Jump to navigation Jump to search
imported>Thnidu
(→‎Examples: restructure bullet list to group together different forms of wikicode that produce the same result)
imported>Thnidu
Line 12: Line 12:
  
 
==Examples==
 
==Examples==
*Link to corresponding article in one language: {{ill2|Adamo|af|Adamo}}
+
*Link to corresponding article in one language:  
**<code><nowiki>{{ill2|Adamo|af|Adamo}}</nowiki></code> <!-- gives {{ill2|Adamo|af|Adamo}} -->
+
**<code><nowiki>{{ill2|Trout|ro|Păstrăv}}</nowiki></code>  
**<code><nowiki>{{ill2|Adamo|af}}</nowiki></code> <!-- also gives {{ill2|Adamo|af}} -->
+
**::produces: {{ill2|Trout|ro|Păstrăv}}  
 
*Links to corresponding articles in multiple languages:  
 
*Links to corresponding articles in multiple languages:  
**<code><nowiki>{{ill2|TC Matic|af|TC Matic|nl|TC Matic|fr|TC Matic|es|TC Matic}}</nowiki></code> <!-- gives {{ill2|TC Matic|af|TC Matic|nl|TC Matic|fr|TC Matic|es|TC Matic}} -->
+
**<code><nowiki>{{ill2|Trout|id|Trout|ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}</nowiki></code>  
**<code><nowiki>{{ill2|TC Matic|af||nl||fr||es|}}</nowiki></code> <!-- also gives {{ill2|TC Matic|af||nl||fr||es|}} -->
+
**::produces: {{ill2|Trout|id|Trout|ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}
*<code><nowiki>{{ill2|Noordkaap|nl|Noordkaap (band)|li|Noordkaap (band)}}</nowiki></code> gives {{ill2|Noordkaap|nl|Noordkaap (band)|li|Noordkaap (band)}}
+
**:''Note that the name is the same in Bahasa Indonesia (<code>id</code>) and English. And so we can use…''
 
+
**<code><nowiki>{{ill2|Trout|id||ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}</nowiki></code>  
In an example like the last one, it is often preferable to use [[piping]] to simulate the effect of
+
**::which also produces: {{ill2|Trout|id||ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}
:<code><nowiki>[[Noordkaap (band)|Noordkaap]]</nowiki></code>.
+
**:''…because if the name of the foreign article is omitted, the English name is used.
This can be accomplished by using the meta-template {{tl|!}}:
 
*<code><nowiki>{{ill2|Noordkaap (band){{!}}Noordkaap|nl|Noordkaap (band)|li|Noordkaap (band)}}</nowiki></code> gives {{ill2|Noordkaap (band){{!}}Noordkaap|nl|Noordkaap (band)|li|Noordkaap (band)}}
 
  
 
==See also==
 
==See also==

Revision as of 09:08, 12 February 2014

History

This template is used on the Wikipedia:WikiProject Belgium page to create links of "wanted" pages to the corresponding articles on foreign language Wikipedias.

Purpose

Use this template if the article titles of the foreign Wikipedias are different from the English title.

Usage

Use : enter {{ill2|Article name| followed by the Wikipedia language codes for each foreign language article you want to link to, each of them followed by a divider '|' and the article title on that Wikipedia. You can add up to 10 languages. Put a divider '|' between the languages. Close the template with }}.

Examples

  • Link to corresponding article in one language:
    • {{ill2|Trout|ro|Păstrăv}}
      produces: Trout [ro]
  • Links to corresponding articles in multiple languages:
    • {{ill2|Trout|id|Trout|ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}
      produces: Trout [id; ro; hu; my]
      Note that the name is the same in Bahasa Indonesia (id) and English. And so we can use…
    • {{ill2|Trout|id||ro|Păstrăv|hu|Pisztráng|my|ထရောက်ငါး}}
      which also produces: Trout [id; ro; hu; my]
      …because if the name of the foreign article is omitted, the English name is used.

See also