Template:Wikipedia/doc

From OpenStreetMap Wiki
Jump to: navigation, search

This template is useful to simply create link to Wikipedia.

Usage

  • 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 emplies 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:

  • icon: if set to no, 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 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);
    any other value (or if the parameter is not specified) will display the active link.
  • 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);
    any other value (or if the parameter is not specified) will display the extra text.

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|es|OpenStreetMap|icon=yes}} ==> OpenStreetMap on Wikipedia
  • {{Wikipedia|es|OpenStreetMap}} ==> 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

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.
  • Instead, you could also just use a direct wiki link: [[wikipedia:xx:pagename|display text]] (xx being the language code; "|display text" is optional).
Available languages — Wikipedia
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Basa Sunda · Baso Minangkabau · bosanski · brezhoneg · català · čeština · corsu · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tagalog · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · भोजपुरी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · བོད་ཡིག · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ ⵜⴰⵏⴰⵡⴰⵢⵜ‎ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 中文(繁體)‎ · 吴语 · 粵語 · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް