Template:Wikipedia

From OpenStreetMap Wiki
Jump to: navigation, search
Wikipedia-16px.png Article on Wikipedia
[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation

This template is useful to simply create link to Wikipedia.

Usage

  • First parameter: language code (the xx in URL "//xx.wikipedia.org/wiki/Yyyy", or any other interwiki code recognized by English Wikipedia); if this parameter is empty, it emplies the English Wikipedia edition.
  • Second parameter: pagename on Wikipedia (Yyyy in URL "//xx.wikipedia.org/wiki/Yyyy"); note however that this parameter should not be URL-encoded (with overlong %XX%XX sequences) but should readable (in native UTF-8), also preferably with spaces rather than underscores between words).
  • Third parameter: title of the link. If unset, the template display the title of the page (second parameter).

There are also three named parameters which define whether some parts of the link are shown:

  • "link": if set to "no" 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)
  • "icon": if set to "no" the template doesn't display the Wikipedia icon
  • "text": if set to "no" 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)

Examples

  • {{Wikipedia|it|OpenStreetMap}} ==> Wikipedia-16px.png OpenStreetMap on Wikipedia
  • {{Wikipedia|eo|OpenStreetMap|Nia projekto}} ==> Wikipedia-16px.png Nia projekto on Wikipedia
  • {{Wikipedia|es|OpenStreetMap|icon=no}} ==> OpenStreetMap on Wikipedia
  • {{Wikipedia|fr|OpenStreetMap|link=no}} ==> wikipedia:fr:OpenStreetMap OpenStreetMap on Wikipedia
  • {{Wikipedia|de|OpenStreetMap|text=no}} ==> Wikipedia-16px.png OpenStreetMap
  • {{Wikipedia|fi|OpenStreetMap|Me|text=no}} ==> Wikipedia-16px.png Me
  • {{Wikipedia|pt|OpenStreetMap|text=no|link=no}} ==> wikipedia:pt:OpenStreetMap OpenStreetMap
  • {{Wikipedia|fi|icon=no|text=no|Me}} ==> Me
  • {{Wikipedia|fi|link=no|icon=no|text=no|Me}} ==> wikipedia:fi:Me
  • {{Wikipedia|fi|link=no|icon=no|Me}} ==> Me on Wikipedia
  • {{Wikipedia|ru|OpenStreetMap}} ==> Wikipedia-16px.png OpenStreetMap on Wikipedia
  • {{Wikipedia|az|OpenStreetMap}} ==> Wikipedia-16px.png OpenStreetMap on Wikipedia
  • {{Wikipedia|cs|OpenStreetMap}} ==> Wikipedia-16px.png OpenStreetMap on Wikipedia
  • {{Wikipedia|commons|Category:OpenStreetMap|text=no}} ==> Wikipedia-16px.png Category:OpenStreetMap

Related

  • 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.
  • Instead, you could also just use a direct wiki link: [[wikipedia:xx:pagename|display text]] (xx being the language code; "|display text" is optional).