Template:On Wikipedia

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
 The article On Wikipedia on Wikipedia projects:
Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:On Wikipedia/doc.

For linking to multiple Wikipedia articles and displaying a translated term. Each link is displayed with the visible language code (whose title gives the localized name of the language in a helper tooltip). The current user language will be listed first, if it has a matching entry specified. All other languages will then be listed in alphabetical order by language code.


{{On Wikipedia |en= }}

This should not be used in place of or in duplication of interwiki links (in the sidebar). In Commons categories, take the local Wikipedia's equivalent categories for the Categories sidebar, and then take the related main articles for this box using interwiki links found in those articles.

Template parameters

article namesEach language can be specified using a parameter named with the language code of a Wikipedia edition – the value is the article name on that editionemptyrequired
font-sizefont sizeChange the font sizenormaloptional
colortext colorChange the color of the leading text and bullets – does not alter the color of the links#54595doptional
border-cborder colorChange the border color#a2a9b1optional
background-cbackground colorChange the background color#f8f9faoptional
nologohide logoIf it has any value, the Wikipedia logo won’t appearemptyoptional
noedithide edit linkIf it has any value, the edit link won’t appear at the end of the listemptyoptional
pageedit pageSet an alternate target full page name to edit (if not the current page){{FULLPAGENAME}}optional
1inline modeIf the value is “inline”, there won’t be a line break before the language list (but after the user language if appears)emptyoptional
floatfloatFloat the box, the value may be “right” or “left”emptyoptional
wikidataWikidata IDDisplay a link to this Wikidata item after the language links (format: Qxxxx)emptyoptional

Additional information

The template is intended to be used in the following namespaces: the Category namespace

The template is intended to be used by the following user groups: all users

Placement: At the top of the page

See also

  • {{Translation table}} – Displays specified text for each language; does not automatically generate links. The language names are spelled out instead of being abbreviated.
  • {{On Wikidata}} – Used to link to the related Wikidata entry.
  • {{See also w}} - "See also Wikipedia article" link to 1~15 articles.
  • {{Multilingual link}} – Displays one link according to the user interface language.


Deutsch  Cymraeg  English  español  Tiếng Việt  Esperanto  українська  Türkçe  日本語  slovenščina  polski  മലയാളം  македонски  မြန်မာဘာသာ  العربية  русский  hrvatski  français  magyar  italiano  português  বাংলা  беларуская (тарашкевіца)  +/−

This template makes use of {{Autotranslate}} and the translate extension.


  • Basic usage:
    {{On Wikipedia |de = Hauptseite |en = Main Page |fr = Accueil |es = Portada |pt = Página principal |sl = Glavna stran }}
 The article On Wikipedia on Wikipedia projects:
  • To display all on one line:
    {{On Wikipedia | inline |de = Hauptseite |en = Main Page |fr = Accueil |es = Portada |pt = Página principal |sl = Glavna stran }}
 The article On Wikipedia on Wikipedia projects:
  • To float right or left:
    {{on Wikipedia |float = right |de = Hauptseite |en = Main Page |fr = Accueil |es = Portada |pt = Página principal |sl = Glavna stran }}
 The article On Wikipedia on Wikipedia projects:

Limitations and possible evolutions

  • Make the list of those alternate languages (except the current user language if it is specified) collapsed by default (unless the user language is not in the list), including if the "inline" parameter is specified (is it useful? should'nt this list be inlined by default ?), or use the language selector.
    For this collapsable list, the label "Other languages" for opening or collapsing the list should be auto-translated, it should just be next to the default language displayed, on the same line. But if the language selector is used, no collapsing feature is needed and if a language is selected there, only that language will be displayed (if this language is not found in parameters, English should be used by default).
    For adding more languages a "+/-" label should allow editing the list of languages : generally it is the name of the current page, but in some uses, an optional parameter should allow specifying the included template where this list of languages is editable.
  • It is suggested to use a "standard" subpage containing only the call to this On Wikipedia template for the topic covered by a category page, to allow simple and automatic maintenance of this list (using interwikis found in Wikipedia), instead of parsing the content of a category page containing this call to this template. This subpage would just contain this call but the name of the On Wikipedia could be replaced by using the value of a "call" parameter, allowing other uses of these translations, and allowing to pass another parameter name (such as "param1=lang") and its value (such as "value1=language-code") for example to select one language and returning the associated value, without formatting it into links like done in this template (so this subpage would become usable for autotranslating references to a given English name).
    This could be used for example to generate the contents of a location template (which also, for now, tries to format a location name into a link, except that it does not prefix it with a visible language code like it is done in this On Wikipedia template), using the same editable list; for example the content of Template:Paris or Template:Germany would just use this common subpage passing it the name of a formatting template generating just this template, using the "call=Template:City" to replace "call=On Wikimedia" given when transcluing this common subpage.
    For such applications, it will still be useful to translate a location name, even if a Wikipedia page does not exist for this location, so the list of languages could contain an alternate form for the language parameter, e.g. "lad.nowp=Saint-Malo" for indicating that there's no Wikipedia currently defined in Ladino for the city name "Saint-Malo" and that the value specified in English as "en=Saint-Malo" could be used as the target on English Wikipedia : this ".nowp" would not be used in a valid language code recognized by On Wikipedia.