Template:Language/archives/Lang2/doc: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
| Preview languages || {{Yes}} || {{Yes}} || {{Yes}} || {{No|English only}} | | Preview languages || {{Yes}} || {{Yes}} || {{Yes}} || {{No|English only}} | ||
|} | |} | ||
== Usage == | |||
For existing pages using {{T|Lang}}: | |||
# On the "Half-Life 2" page for example, edit all page, including translated one and replace {{t|Lang}} with {{t|Lang2}}. | |||
# Remove suf-based language suffixes ({{Code|{{!}}suf{{=}}<nowiki>:</nowiki>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 {{npp|4}} (or other software), and replace all ({{Code|{{!}}suf{{=}}<nowiki>:</nowiki>de}}) with blank text.}} | |||
# Remove the language suffixes on the language categories from all language subpages. For example, {{Code|<nowiki>[[Category:My Cute Category:ru]]</nowiki>}} will become [[Category:My Cute Category]]. | |||
# Move the page of the translated page (the one with {{Code|{{!}}suf{{=}}<nowiki>:</nowiki><[[#SupportedLanguages|language code]]>}} suffix) to new suffix My Cute Article/<[[#SupportedLanguages|language code]]> (for example, My Cute Article:zh-cn will become an My Cute Article/zh); | |||
# Move the shared or international templates (such as navboxes, topicons, etc...) to the base page; | |||
== Parameters | {{Todo|Should we bring back separate language categories (which Lang uses) or remove it like MultiPage?}} | ||
: If the article pertains to an entity, move the {{code|{{t|This is a}}}} template to the root page. The template is automatically translated. For {{code|{{t|Entity}}}} or {{code|{{t|Format}}}} templates, replace it with {{T|This is a}} template. | |||
== Parameters and Examples == | |||
{| class="standard-table sortable" style="width:100%;" | {| class="standard-table sortable" style="width:100%;" | ||
! Parameter !! Description !! Example | ! Parameter !! Description !! Example |
Revision as of 09:28, 4 July 2024

This is a documentation subpage for Template:Language.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
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}}.
- 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:My Cute Category:ru]] will become.
- Move the page of the translated page (the one with |suf=:<language code> suffix) to new suffix My Cute Article/<language code> (for example, My Cute Article:zh-cn will become an My Cute Article/zh);
- Move the shared or international templates (such as navboxes, topicons, etc...) to the base page;
Todo: Should we bring back separate language categories (which Lang uses) or remove it like MultiPage?
- If the article pertains to an entity, move the {{This is a}} template to the root page. The template is automatically translated. For {{Entity}} or {{Format}} templates, replace it with {{This is a}} template.
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.
![]() ![]() ![]() |
|
{{{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.
![]() |
|
{{{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}}} | Todo: Document it.
|
[Todo] |
Currently Supported Languages
- Coming soon.
- Also, this template automatically adds a page language category at the bottom of the page.