Template:Lang links/doc
Uses Lua: |
This is a documentation subpage for Template:Lang links. It contains usage information, categories, and other content that is not part of the original template page. |
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:Autoarchive resolved section}}
→ English | +/-
Compare:
{{lang links cheap|Template:Autoarchive resolved section}}
→ (based on Special:Prefixindex), which does not distinguish between a postfix for a language and other postfixes such as /doc and /layout. 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 |
Template data | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information Shows which language versions of a page exist.
|
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
See also
{{Ll}}, {{Lle}}, {{lang links cheap}}
Localization
This template is not intended to be localized.