Template:Lang links/doc

From Wikimedia Commons, the free media repository
Jump to: navigation, search

Shows which language versions of a page exist.

Usage

{{Lang links |1= }}

This template shows which language versions of a page exist (based on the naming scheme ../xx, with xx the language code), and provides links to them. For example:

{{lang links|Template:No source since}}العربية | Беларуская (тарашкевіца)‎ | Български | Català | Čeština | Dansk | Deutsch | Deutsch (Sie-Form)‎ | Ελληνικά | English | Español | فارسی | Suomi | Français | Galego | Magyar | Bahasa Indonesia | Italiano | 日本語 | 한국어 | Македонски | മലയാളം | Nederlands | Norsk nynorsk | Norsk bokmål | Polski | Português | Português do Brasil | Русский | Slovenčina | Slovenščina | Svenska | Türkçe | Українська | 中文 | 中文(简体)‎ | +/−

Compare:

{{Special:PrefixIndex/Template:No source since/}}
No source since/ar No source since/be-tarask No source since/bg
No source since/ca No source since/cs No source since/da
No source since/de No source since/de-formal No source since/el
No source since/en No source since/es No source since/fa
No source since/fi No source since/fr No source since/gl
No source since/hu No source since/id No source since/it
No source since/ja No source since/ko No source since/lang
No source since/layout No source since/mk No source since/ml
No source since/nl No source since/nn No source since/no
No source since/pl No source since/pt No source since/pt-br
No source since/ru No source since/sk No source since/sl
No source since/sv No source since/tr No source since/uk
No source since/zh-hans

which does not distinguish between a postfix for a language and other postfixes such as /doc and /layout. Also it takes more space. Another difference is that the language code is shown, rather than the local name.

This template should not be used on templates to avoid hitting the "expensive parser function" or the "LUA execution time" limit on pages with other expensive templates. If your template needs language links, create a /lang subpage, transclude it to the template and regularly update it using {{subst:lle}}. Never use this template directly or indirectly on templates intended for the file namespace that will likely stay there for a long time.

Performance: This template makes use of different approaches to be fast and correct. First, it evaluates all subpages of the page it show the language links for. If this takes too long, it switches to another approach: It checks, for each language, whether a page in that language exists. Therefore: If can avoid that your page gets a lot of subpages, this template's performance will be superior. Technical details and talk at Template talk:Lang links#Using LUA.

Template:Ll will generate the same results but must be substituted.

Template parameters

Parameter Description Default Status
1 Page name of the page that's subpages provide the translation {{NAMESPACE}}:{{BASEPAGENAME}} optional
addlink provide an alternative add-link or whatever you like right after the language links {{edit|{{NAMESPACE}}:{{BASEPAGENAME}}/lang}} optional
suppressaddlink allows to remove the +/- -link empty optional

Additional information

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

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

Relies on:
Module:Languages, Module:Languages/List, Module:Page

Localization

This template is not intended to be localized.