User:1416006136/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.
Unlike {{Otherlang2}}, this template does not require any parameters to work on English pages. But other translation pages require an unnamed parameter to be defined to work. 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. Template:ModernNote
- The
title
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).

- The
$title
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}}.
- The
notitle
parameter can be used to change the title of the site page itself, but not for the Title of the article itself.
- The
noline
parameter can be set to 1 to hide the line under the title. If you don't plan on using it, don't bother defining it.
- The
noborder
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.
Here's an example for a hypothetical Spanish page called Category:Hello:es:
{{lang|Category:Hello|title=Categoría:Hola|noline=1}}
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, and hide the line under the title.
Language | Page name | Icon | Icon Template |
---|---|---|---|
English | Page_name | ![]() |
{{en}}
|
Catalan | Page_name:ca | ![]() |
{{ca}}
|
Czech | Page_name:cs | ![]() |
{{cz}}
|
German | Page_name:de | ![]() |
{{de}}
|
Spanish | Page_name:es | ![]() |
{{es}}
|
Estonian | Page_name:et | ![]() |
{{et}}
|
French | Page_name:fr | ![]() |
{{fr}}
|
Hungarian | Page_name:hu | ![]() |
{{hu}}
|
Italian | Page_name:it | ![]() |
{{it}}
|
Dutch | Page_name:nl | ![]() |
{{nl}}
|
Norwegian | Page_name:no | ![]() |
{{norway}}
|
Polish | Page_name:pl | ![]() |
{{pl}}
|
Portuguese | Page_name:pt | ![]() |
{{pt}}
|
Portuguese (Brazilian) | Page_name:pt-br | ![]() |
{{pt-br}}
|
Russian | Page_name:ru | ![]() |
{{ru}}
|
Ukrainian | Page_name:uk | ![]() |
{{uk}}
|
Swedish | Page_name:sv | ![]() |
{{sv}}
|
Turkish | Page_name:tr | ||
{{tr}}
| |||
Japanese | Page_name:ja | ![]() |
{{ja}}
|
Chinese (PRC) | Page_name:zh-cn | ![]() |
{{zh-cn}}
|
Chinese (Taiwan) | Page_name:zh-tw | ![]() |
{{zh-tw}}
|
Korean | Page_name:ko | ![]() |
{{ko}}
|
Georgian | Page_name:ka | ![]() |
{{ka}}
|
Hebrew | Page_name:he | ![]() |
{{he}}
|
- Also, this template automatically adds a page language category at the bottom of the page.
