Template:Lang: Difference between revisions
m (added Estonian) |
Hardway245 (talk | contribs) No edit summary |
||
Line 72: | Line 72: | ||
|- | |- | ||
|Hebrew ||Page_name:he ||[[File:He.png]] | |Hebrew ||Page_name:he ||[[File:He.png]] | ||
|- | |||
|Greek ||Page_name:gr ||[[File:Gr1.png]] | |||
|} | |} | ||
*Also, this template automatically adds a page language category at the bottom of the page. | *Also, this template automatically adds a page language category at the bottom of the page. |
Revision as of 12:13, 4 February 2022

This template is an improved version of {{otherlang2}}
. It retains all the functionality, adds Hebrew properly, 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 requires 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:. It should not include any language suffixes, however, such as :ru. 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
.
- 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.
Currently supported languages:
Language | Page name | Icon |
---|---|---|
English | Page_name | ![]() |
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:ua | ![]() |
Swedish | Page_name:sv | ![]() |
Turkish | Page_name:tr | ![]() |
Japanese | Page_name:jp | ![]() |
Chinese (PRC) | Page_name:zh-cn | ![]() |
Chinese (Taiwan) | Page_name:zh-tw | ![]() |
Korean | Page_name:ko | ![]() |
Georgian | Page_name:ka | ![]() |
Hebrew | Page_name:he | ![]() |
Greek | Page_name:gr | File:Gr1.png |
- Also, this template automatically adds a page language category at the bottom of the page.
For information on how the template detects other languages, view this page's source code.