From translatewiki.net
Jump to navigation Jump to search


Test Template Info-Icon - Version (2).svg
The documentation of this template is included from its /doc subpage. [Edit]
  • 1=PageName (optional) - the name of the page to display language links for. If omitted then the English version of the current page is used. This parameter can normally be omitted, as it is only required if you want to link to a page other than the one you place the template on, which is very uncommon. If this parameter is used on a sub-page make sure you supply the root name, not the full page name (e.g. on Template:Welcome/i18n/fr you would need to use {{{Languages|Template:Welcome/i18n}}} and not {{{Languages|Template:Welcome/i18n/fr}}}).

The template should only be placed on pages that exist in more than one language, and it should be placed in the same location on each translation of the page.

The English version of a page is always the main version, with all other languages as sub-pages, named using the appropriate language code (see below).

For example, on the Template:Welcome/i18n you would include the text {{Languages}}, on Main Page itself, and on each of its language sub-pages. The template automatically creates links to any language sub-pages that exist, e.g. Template:Welcome/i18n/en, Template:Welcome/i18n/es, Template:Welcome/i18n/fr, and ignores non-existant languages.

Supported languages:

This shows you the name of each language's sub-page (using Template:Welcome as an example). Other languages may be added easily as necessary. Please do not add languages for which no pages exist yet, as this will increase the time needed to include the template without adding any benefit (languages are only displayed to the user when the relevant page exists).

A theoretical maximum of 100 languages is possible, but this should stay below 90 (after that, this will exhaust the number of costly parser function calls, caused by tests for page existence, either in the template itself, or in pages needing a few of these functions; if this limit is exceeded, affected pages are listed in Category:Pages with too many expensive parser function calls).


Here is how the language bar looks on the Template:Welcome/i18n: