Template:Lang2
![Under construction icon-blue.png](/w/images/thumb/d/df/Under_construction_icon-blue.png/32px-Under_construction_icon-blue.png)
Remember to check for any notes left by the tagger at this article's talk page.
![Under construction.png](/w/images/thumb/f/f8/Under_construction.png/32px-Under_construction.png)
As a courtesy, please do not edit this Template while this message is displayed.
If this page has not been edited for at least several hours to a few days, please remove this template. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page.
The person who added this notice will be listed in its edit history should you wish to contact them.
Additional Notes: This template is not recommended to be used in any pages yet, as it's need to be tested. Feel free to contribute.
A translation template. Successor to both {{Lang}}
(itself was forked to create {{Lang2}}
) and {{MultiPage}}
, while solving most of the limitations in both templates. Currently the template is largely incomplete and cannot be used in any pages until bugs or issues is fixed. Also this template only support very few languages as it was being rewritten to only support languages that are most popular, and to cleaning up code before adding new languages.
Differences
Usage
For existing pages using {{Lang}}
:
- On the "Half-Life 2" page for example, edit all page, including translated one and replace
{{Lang}}
with{{Lang2}}
. Most previous parameters from{{Lang}}
should work with{{Lang2}}
. - Remove suf-based language suffixes (
|suf=:de
) from all language subpages, and if the template support Autolang, remove it from all templates as well. They are deprecated and no longer needed.Tip:You can use
Notepad++ (or other software), and replace all (
|suf=:de
) with blank text. - Remove the language suffixes on the language categories from all language subpages. For example,
[[Category:Source:ru]]
will become. - Move the translated page (From
Example article:<language code>
to new suffixExample article/<language code>
(for example, Half-Life 2:zh-cn will become an Half-Life 2/zh). Done.
![Icon-Important.png](/w/images/thumb/5/5c/Icon-Important.png/10px-Icon-Important.png)
- For pages using deprecated
or{{Entity}}
templates, replace it with{{Format}}
{{This is a}}
template.
![Blank image.png](/w/images/b/ba/Blank_image.png)
![Note.png](/w/images/thumb/c/cc/Note.png/10px-Note.png)
This will workaround the issues that the search suggestions are showing results from both the base (English) page and the translated page, cluttering the results.
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 , etc.
![]() ai_changehintgroup must be written as Ai changehintgroup . However, this parameter can be omitted if the page name is without a suffix.![]() ![]() {{Lang2|{{FULLPAGENAME}}}} instead of writing the article name, unless there are any issues mentioned above. |
|
{{{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.
![]() <page1><lang code>/<page2><lang code>/... , such as L4D Level Design/Panic Events/zh |
|
{{{title}}}
|
This parameter can be used to change the page title (logically, into the text that should be displayed for the language of the page).
![]() |
|
{{{$title}}}
|
This parameter can be used to change the text of the page titlebar and place the title under the <code> tag - {{Lang2|Template:Lang2|$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}}}
|
![]() |
![]()
|
Currently Supported Languages
- Coming soon.
- Also, this template automatically adds a page language category at the bottom of the page.
The above documentation is transcluded from Template:Lang2/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this page.