Difference between revisions of "Template:Interwiki/doc"

From Cantr II Wiki
Jump to: navigation, search
m
 
(7 intermediate revisions by 3 users not shown)
Line 3: Line 3:
 
== Usage ==
 
== Usage ==
  
First step: create a template named <tt>Template:InterwikiLink:ArticleName</tt>. Replacing "ArticleName" by the original name of the article (in English) without spaces and using UpperCamelCase style. Example: for the article "Pierogi with cheese" create the template <tt>Template:InterwikiLink:PierogiWithCheese</tt>.
+
First step: create a template named <tt>Template:InterwikiLink:ArticleName</tt>. Replacing "ArticleName" by the original name of the article (in English) without spaces and using UpperCamelCase style. Example: for the article "Pierogi with cheese" create the template <tt>Template:InterwikiLink:PierogiWithCheese</tt>. If necessary, also include the '''NAMESPACE''' within the name. Example: for the category "Animals" create the template <tt>Template:InterwikiLink:CategoryAnimals</tt>.
  
 
Second step: put the following code in the template created.
 
Second step: put the following code in the template created.
Line 9: Line 9:
 
<pre>
 
<pre>
 
{{Interwiki
 
{{Interwiki
| de =  
+
| bg  =
| en =  
+
| ch  =
| es =  
+
| de =  
| eo =  
+
| en =
| fr =  
+
| eo  =  
| lt =  
+
| es =  
| nl =  
+
| fi  =  
| pl =  
+
| fr =
| pt =  
+
| it  =
| ru =
+
| jbo =  
| fi =  
+
| lt =  
| sv =  
+
| nl =  
| tr =
+
| pl =  
| ch =  
+
| pt =  
 +
| ru =  
 +
| sv =  
 +
| tr =  
 
}}
 
}}
 
</pre>
 
</pre>
Line 36: Line 39:
 
}}
 
}}
 
</pre>
 
</pre>
 
+
or for categories:
 +
<pre>
 +
{{
 +
| en  = :Category:Animals
 +
| es  = :Category:Animales
 +
}}
 +
</pre>
 
Fourth and last step: add the following code at the top of the original article and also in all language versions of the article.
 
Fourth and last step: add the following code at the top of the original article and also in all language versions of the article.
  

Latest revision as of 09:44, 8 September 2015

{{Interwiki}} is a template that serves to link the different language versions of the same article.

Usage

First step: create a template named Template:InterwikiLink:ArticleName. Replacing "ArticleName" by the original name of the article (in English) without spaces and using UpperCamelCase style. Example: for the article "Pierogi with cheese" create the template Template:InterwikiLink:PierogiWithCheese. If necessary, also include the NAMESPACE within the name. Example: for the category "Animals" create the template Template:InterwikiLink:CategoryAnimals.

Second step: put the following code in the template created.

{{Interwiki
| bg  =
| ch  = 
| de  = 
| en  = 
| eo  = 
| es  = 
| fi  = 
| fr  = 
| it  =
| jbo = 
| lt  = 
| nl  = 
| pl  = 
| pt  = 
| ru  = 
| sv  = 
| tr  = 
}}

Third step: add the different names of the article in the appropriate fields. Delete the unused fields. For example:

{{Interwiki
| de = Kabeljau
| en = Cod
| eo = moruo
| es = Bacalao
| sv = Torsk
}}

or for categories:

{{
| en  = :Category:Animals
| es  = :Category:Animales
}}

Fourth and last step: add the following code at the top of the original article and also in all language versions of the article.

{{InterwikiLink:ArticleName}}

Replacing "ArticleName" by the original name of the article (in English) without spaces and using UpperCamelCase style.