Template:Lang/doc
Don't forget to purge the contents of the base page upon creating or editing this subpage.
This template is an improved version of {{Otherlang2}}. It retains all the functionality and automatically detects which languages a page has been translated into. It works on English and non-English pages, with or without namespaces. Otherlang2 may still be used, in the rare case that a translated page does not follow the wiki's standard method for translated page titles. As of 2023 (and still ongoing), it is slowly being replaced by {{MultiPage}}, which supports more languages and they are fully ISO 639 compliant.
Parameters and Examples
Parameter | Description | Example |
---|---|---|
{{{1}}}
|
The page that the template create multi-language links according to. It is required for other translation page. The contents of it should be the full name of the page the template is being applied on, including namespaces such as Help: , Template: , User: , etc. It should not include any language suffixes, however, such as :ru , :es , :zh-cn , etc.
Note:Capitalization matters, even on the first letter of the page name! Underscores must be replaced with spaces.
ai_changehintgroup must be written as Ai changehintgroup . However, this parameter can be omitted if the page name is without a suffix. |
|
{{{2}}} ~ {{{8}}}
|
These parameters are used to link subpages (such as L4D2 Level Design/Add-on Notes , L4D Level Design/Panic Events , Half-Life: Alyx Workshop Tools/Animgraph/AnimGraph Introduction , etc.). Just replace "/ " with "| " to link correctly. See the examples for details how to use them.
Note:Do not link subpages with "
/ "! Use "| " instead of "/ ". Therefore, the template can link the pages correctly.Note:The subpages must be moved to a correctly name so that the template can link them. Non-English subpage names must follow this format:
<page1><lang code>/<page2><lang code>/... , such as L4D Level Design:zh-cn/Panic Events:zh-cn |
|
{{{title}}}
|
This parameter can be used to change the text of the page titlebar (logically, into the text that should be displayed for the language of the page).
Warning:On some pages you may receive this error: Warning: Display title "env_cubemap" overrides earlier display title "<code>Env cubemap</code>". This can be due to the fact that the page uses a different template in which the page title is set.
|
|
{{{$title}}}
|
This parameter can be used to change the text of the page titlebar and place the title under the <code> tag - {{lang|Template:Lang|$title=$model}}. | |
{{{notitle}}}
|
This parameter can be used to change the title of the site page itself, but not for the title of the article itself. | |
{{{noborder}}}
|
This parameter can be set to 1 to hide the border around lang icons. If you don't plan on using it, don't bother defining it. | |
{{{select}}}
|
The selection mode of the title. 1 is the one-click selection (just like clicking the "1").
|
|
{{{up}}}
|
Todo: Document it.
|
[Todo] |
Examples
Here's an example for a hypothetical Spanish page called Category:Hello:es:
This will add icons for all the versions of this page in different languages. It will also change the displayed title to a Spanish version of the name.
Currently Supported Languages
Language | Page name | Icon |
---|---|---|
English | Page_name | |
Esperanto | Page_name:eo | |
Catalan | Page_name:ca | |
Czech | Page_name:cs | |
German | Page_name:de | |
Spanish | Page_name:es | |
Estonian | Page_name:et | |
French | Page_name:fr | |
Hungarian | Page_name:hu | |
Italian | Page_name:it | |
Dutch | Page_name:nl | |
Norwegian | Page_name:no | |
Polish | Page_name:pl | |
Portuguese | Page_name:pt | |
Portuguese (Brazilian) | Page_name:pt-br | |
Russian | Page_name:ru | |
Ukrainian | Page_name:uk | |
Swedish | Page_name:sv | |
Turkish | Page_name:tr | |
Japanese | Page_name:ja | |
Chinese (PRC) | Page_name:zh-cn | |
Chinese (Taiwan) | Page_name:zh-tw | |
Korean | Page_name:ko | |
Georgian | Page_name:ka | |
Hebrew | Page_name:he |
- Also, this template automatically adds a page language category at the bottom of the page.