Difference between revisions of "Template:W"

From ChoralWiki
Jump to navigation Jump to search
m
(improved doc)
Line 7: Line 7:
  
 
===Syntax===
 
===Syntax===
{{tl|W|counterpoint}} or {{tl|w|counterpoint}}
+
{{tl|W|1{{=}}<''Wikipedia article''>|2{{=}}<''displayed text''>|lang{{=}}<''2-digit language code''>}}
:which produces:
+
:or
 +
{{tl|w|<''Wikipedia article''>|<''displayed text''>|lang{{=}}<''2-digit language code''>}}
 +
 
 +
where
 +
*{{para|1}} article's title as seen on Wikipedia. It is mandatory;
 +
*{{para|2}} optional text to be displayed in the link. If not informed, the Wikipedia title will be used;
 +
*{{para|lang}} language of the Wikipedia article. It's the first two digits of the link (for example, '''de''' in de.wikipedia.org); it defaults to English, so informing {{para|lang|en}} is not necessary.
 +
 
 +
Note that hovering the mouse over the <sup>[[File:Wikipedia's W.svg|12px|link=|]]</sup> will display a tooltip box with information about the link.
 +
 
 +
===Examples===
 +
{{tl|W|counterpoint}}
 +
:produces:
 
{{W|counterpoint}}
 
{{W|counterpoint}}
  
===Examples===
 
 
{{tl|W|William Smith (composer)|William Smith}}
 
{{tl|W|William Smith (composer)|William Smith}}
:which produces:
+
:produces:
 
{{W|William Smith (composer)|William Smith}}
 
{{W|William Smith (composer)|William Smith}}
  
 
{{tl|W|Franz Xaver Engelhart|lang{{=}}de‎‎}}
 
{{tl|W|Franz Xaver Engelhart|lang{{=}}de‎‎}}
:which produces:
+
:produces:
 
{{W|Franz Xaver Engelhart|lang=de}}
 
{{W|Franz Xaver Engelhart|lang=de}}
  

Revision as of 02:36, 29 November 2020


Documentation

This template is used to create an inline link to the corresponding Wikipedia article for that subject.

Syntax

{{W|1=<Wikipedia article>|2=<displayed text>|lang=<2-digit language code>}}

or

{{w|<Wikipedia article>|<displayed text>|lang=<2-digit language code>}}

where

  • |1= article's title as seen on Wikipedia. It is mandatory;
  • |2= optional text to be displayed in the link. If not informed, the Wikipedia title will be used;
  • |lang= language of the Wikipedia article. It's the first two digits of the link (for example, de in de.wikipedia.org); it defaults to English, so informing |lang=en is not necessary.

Note that hovering the mouse over the Wikipedia's W.svg will display a tooltip box with information about the link.

Examples

{{W|counterpoint}}

produces:

counterpointLink to the English Wikipedia article

{{W|William Smith (composer)|William Smith}}

produces:

William SmithLink to the English Wikipedia article

{{W|Franz Xaver Engelhart|lang=de‎‎}}

produces:

Franz Xaver EngelhartLink to the German Wikipedia article

Categorization

The page is categorized according to the language of the Wikipedia article: English Wikipedia links, French Wikipedia links etc.

See also