Difference between revisions of "Template:Wikipedia/doc"
Jump to navigation
Jump to search
(→Usage: Added warning that the rendering of "on Wikipedia" was slightly changed) |
(Clarifying some annoying differences with 'my' version) |
||
Line 7: | Line 7: | ||
* First parameter (mandatory): the Wikipedia linguistic edition code; | * First parameter (mandatory): the Wikipedia linguistic edition code; | ||
*: it is the <var style="color:#080">xx</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>", or any other '''interwiki code''' recognized by English Wikipedia); | *: it is the <var style="color:#080">xx</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>", or any other '''interwiki code''' recognized by English Wikipedia); | ||
*: When this required parameter is empty, it | *: When this required parameter is empty, it implies the English Wikipedia edition (so the empty value is equivalent to the <code>en</code> value). | ||
* Second parameter: the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter) | * Second parameter: the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter) | ||
*: it is the <var style="color:#080">Pagename</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>"); | *: it is the <var style="color:#080">Pagename</var> in URL "<nowiki>//</nowiki><var style="color:#080">xx</var>.wikipedia.org/wiki/<var style="color:#080">Pagename</var>"); | ||
Line 14: | Line 14: | ||
There are also three named parameters which define whether some parts of the link are shown: | There are also three named parameters which define whether some parts of the link are shown: | ||
* <code>lang</code>: language for the ''destination'' page (default: current language) | |||
* <code>icon</code>: if set to <code>no</code>, the template doesn't display the Wikipedia icon; | * <code>icon</code>: if set to <code>no</code>, the template doesn't display the Wikipedia icon; | ||
*: any other value (or if the parameter is not specified) will display this icon. | *: any other value (or if the parameter is not specified) will display this icon. | ||
Line 22: | Line 23: | ||
=== Examples === | === Examples === | ||
* <tt><nowiki>{{Wikipedia|it|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|it|OpenStreetMap}} | * <tt><nowiki>{{Wikipedia|lang=it|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=it|OpenStreetMap}} | ||
* <tt><nowiki>{{Wikipedia|eo|OpenStreetMap|Nia projekto}}</nowiki></tt> ==> {{Wikipedia|eo|OpenStreetMap|Nia projekto}} | * <tt><nowiki>{{Wikipedia|lang=eo|OpenStreetMap|Nia projekto}}</nowiki></tt> ==> {{Wikipedia|lang=eo|OpenStreetMap|Nia projekto}} | ||
* <tt><nowiki>{{Wikipedia|de|OpenStreetMap|text=no}}</nowiki></tt> ==> {{Wikipedia|de|OpenStreetMap|text=no}} | * <tt><nowiki>{{Wikipedia|lang=de|OpenStreetMap|text=no}}</nowiki></tt> ==> {{Wikipedia|lang=de|OpenStreetMap|text=no}} | ||
* <tt><nowiki>{{Wikipedia|es|OpenStreetMap|icon=no}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|icon=no}} | * <tt><nowiki>{{Wikipedia|lang=es|OpenStreetMap|icon=no}}</nowiki></tt> ==> {{Wikipedia|lang=es|OpenStreetMap|icon=no}} | ||
* <tt><nowiki>{{Wikipedia|es|OpenStreetMap|icon=yes}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|icon=yes}} | * <tt><nowiki>{{Wikipedia|lang=es|OpenStreetMap|icon=yes}}</nowiki></tt> ==> {{Wikipedia|lang=es|OpenStreetMap|icon=yes}} | ||
* <tt><nowiki>{{Wikipedia|es|OpenStreetMap|icon=yes|text=no}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|icon=yes|text=no}} | * <tt><nowiki>{{Wikipedia|lang=es|OpenStreetMap|icon=yes|text=no}}</nowiki></tt> ==> {{Wikipedia|lang=es|OpenStreetMap|icon=yes|text=no}} | ||
* <tt><nowiki>{{Wikipedia|es|OpenStreetMap|text=no}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|text=no}} | * <tt><nowiki>{{Wikipedia|lang=es|OpenStreetMap|text=no}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|text=no}} | ||
* <tt><nowiki>{{Wikipedia|es|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|es|OpenStreetMap|icon=no}} | * <tt><nowiki>{{Wikipedia|lang=es|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=es|OpenStreetMap|icon=no}} | ||
* <tt><nowiki>{{Wikipedia|fr|OpenStreetMap|link=no}}</nowiki></tt> ==> {{Wikipedia|fr|OpenStreetMap|link=no}} | * <tt><nowiki>{{Wikipedia|lang=fr|OpenStreetMap|link=no}}</nowiki></tt> ==> {{Wikipedia|lang=fr|OpenStreetMap|link=no}} | ||
* <tt><nowiki>{{Wikipedia|fi|OpenStreetMap|Me|text=no}}</nowiki></tt> ==> {{Wikipedia|fi|OpenStreetMap|Me|text=no}} | * <tt><nowiki>{{Wikipedia|lang=fi|OpenStreetMap|Me|text=no}}</nowiki></tt> ==> {{Wikipedia|fi|OpenStreetMap|Me|text=no}} | ||
* <tt><nowiki>{{Wikipedia|pt|OpenStreetMap|text=no|link=no}}</nowiki></tt> ==> {{Wikipedia|pt|OpenStreetMap|text=no|link=no}} | * <tt><nowiki>{{Wikipedia|lang=pt|OpenStreetMap|text=no|link=no}}</nowiki></tt> ==> {{Wikipedia|lang=pt|OpenStreetMap|text=no|link=no}} | ||
* <tt><nowiki>{{Wikipedia|fi|icon=no|text=no|Me}}</nowiki></tt> ==> {{Wikipedia|fi|icon=no|text=no|Me}} | * <tt><nowiki>{{Wikipedia|lang=fi|icon=no|text=no|Me}}</nowiki></tt> ==> {{Wikipedia|lang=fi|icon=no|text=no|Me}} | ||
* <tt><nowiki>{{Wikipedia|fi|link=no|icon=no|text=no|Me}}</nowiki></tt> ==> {{Wikipedia|fi|link=no|icon=no|text=no|Me}} | * <tt><nowiki>{{Wikipedia|lang=fi|link=no|icon=no|text=no|Me}}</nowiki></tt> ==> {{Wikipedia|lang=fi|link=no|icon=no|text=no|Me}} | ||
* <tt><nowiki>{{Wikipedia|fi|link=no|icon=no|Me}}</nowiki></tt> ==> {{Wikipedia|fi|link=no|icon=no|Me}} | * <tt><nowiki>{{Wikipedia|lang=fi|link=no|icon=no|Me}}</nowiki></tt> ==> {{Wikipedia|lang=fi|link=no|icon=no|Me}} | ||
* <tt><nowiki>{{Wikipedia|ru|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|ru|OpenStreetMap}} | * <tt><nowiki>{{Wikipedia|lang=ru|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=ru|OpenStreetMap}} | ||
* <tt><nowiki>{{Wikipedia|az|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|az|OpenStreetMap}} | * <tt><nowiki>{{Wikipedia|lang=az|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=az|OpenStreetMap}} | ||
* <tt><nowiki>{{Wikipedia|cs|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|cs|OpenStreetMap}} | * <tt><nowiki>{{Wikipedia|lang=cs|OpenStreetMap}}</nowiki></tt> ==> {{Wikipedia|lang=cs|OpenStreetMap}} | ||
* <tt><nowiki>{{Wikipedia | * <tt><nowiki>{{Wikipedia|Category:OpenStreetMap|text=no}}</nowiki></tt> ==> {{Wikipedia|Category:OpenStreetMap|text=no}} | ||
=== See also === | === See also === | ||
* The other, similar [[Template:WikiIcon]] does not add extra text ("on Wikipedia"). Also by default it does exactly what it says in the title: draws an icon | * The other, similar [[Template:WikiIcon]] does not add extra text ("on Wikipedia"). Also, by default it does exactly what it says in the title: draws an icon. | ||
<includeonly> | <includeonly> |
Revision as of 13:50, 14 September 2022
![]() |
This is a ![]() ![]() It contains usage information, ![]() |
This template is useful to simply create link to Wikipedia.
Usage
![]() | This template is in flux; currently, a small Wikipedia icon is always shown to explain that the link is external to the SL Wiki. This might change in the future |
- First parameter (mandatory): the Wikipedia linguistic edition code;
- it is the xx in URL "//xx.wikipedia.org/wiki/Pagename", or any other interwiki code recognized by English Wikipedia);
- When this required parameter is empty, it implies the English Wikipedia edition (so the empty value is equivalent to the
en
value).
- Second parameter: the actual pagename on Wikipedia (or in the target wiki of the interwiki code specified in the first parameter)
- it is the Pagename in URL "//xx.wikipedia.org/wiki/Pagename");
- note however that this parameter should not be URL-encoded (with overlong
%NN%NN
sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words.
- Third parameter: the text to display with the link. If unset, the template displays the title of the page (second parameter).
There are also three named parameters which define whether some parts of the link are shown:
lang
: language for the destination page (default: current language)icon
: if set tono
, the template doesn't display the Wikipedia icon;- any other value (or if the parameter is not specified) will display this icon.
link
: if set tono
, the template doesn't display an active link to the Wikipedia article (the link may still be visible when hovering the icon, if there's one);- any other value (or if the parameter is not specified) will display the active link.
text
: if set tono
, the template doesn't display the sentence "on Wikipedia" (which is translated according to the language of the current page on this wiki, but not the language of the target Wikipedia);- any other value (or if the parameter is not specified) will display the extra text.
Examples
- {{Wikipedia|lang=it|OpenStreetMap}} ==>
OpenStreetMap
- {{Wikipedia|lang=eo|OpenStreetMap|Nia projekto}} ==>
Nia projekto
- {{Wikipedia|lang=de|OpenStreetMap|text=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=es|OpenStreetMap|icon=no}} ==> OpenStreetMap
- {{Wikipedia|lang=es|OpenStreetMap|icon=yes}} ==>
OpenStreetMap
- {{Wikipedia|lang=es|OpenStreetMap|icon=yes|text=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=es|OpenStreetMap|text=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=es|OpenStreetMap}} ==> OpenStreetMap
- {{Wikipedia|lang=fr|OpenStreetMap|link=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=fi|OpenStreetMap|Me|text=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=pt|OpenStreetMap|text=no|link=no}} ==>
OpenStreetMap
- {{Wikipedia|lang=fi|icon=no|text=no|Me}} ==> Me
- {{Wikipedia|lang=fi|link=no|icon=no|text=no|Me}} ==> Me
- {{Wikipedia|lang=fi|link=no|icon=no|Me}} ==> Me
- {{Wikipedia|lang=ru|OpenStreetMap}} ==>
OpenStreetMap
- {{Wikipedia|lang=az|OpenStreetMap}} ==>
OpenStreetMap
- {{Wikipedia|lang=cs|OpenStreetMap}} ==>
OpenStreetMap
- {{Wikipedia|Category:OpenStreetMap|text=no}} ==>
Category:OpenStreetMap
See also
- The other, similar Template:WikiIcon does not add extra text ("on Wikipedia"). Also, by default it does exactly what it says in the title: draws an icon.