User:1416006136/Template:Lang/doc

From Valve Developer Community
< User:1416006136
Revision as of 03:53, 12 February 2023 by 1416006136 (talk | contribs) (Created page with "<noinclude>Category:English{{doc|0}}</noinclude>__NOTOC__ This template is an improved version of {{tl2|Otherlang2}}. It retains all the functionality and ''automatically'...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
This is a documentation subpage for User:1416006136.
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
Todo: document {{{up}}}, {{{1}}}, {{{2}}}, {{{3}}}, {{{4}}}, {{{5}}}, {{{6}}}, {{{7}}}, {{{8}}}.
  • 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).
Warning.pngWarning: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.
  • 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.

Currently Supported Languages
Language Page name Icon Icon Template
English Page_name English {{en}}
Catalan Page_name:ca Català {{ca}}
Czech Page_name:cs Čeština {{cz}}
German Page_name:de Deutsch {{de}}
Spanish Page_name:es Español {{es}}
Estonian Page_name:et Eestlane {{et}}
French Page_name:fr Français {{fr}}
Hungarian Page_name:hu Magyar {{hu}}
Italian Page_name:it Italiano {{it}}
Dutch Page_name:nl Nederlands {{nl}}
Norwegian Page_name:no Norsk {{norway}}
Polish Page_name:pl Polski {{pl}}
Portuguese Page_name:pt Português {{pt}}
Portuguese (Brazilian) Page_name:pt-br Português-Brasileiro {{pt-br}}
Russian Page_name:ru Русский {{ru}}
Ukrainian Page_name:uk Українська {{uk}}
Swedish Page_name:sv Svenska {{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.
Note.pngNote:Most of these language codes are ISO 639 codes.