Template:Languages

From OpenStreetMap Wiki
Revision as of 23:32, 10 March 2018 by Verdy p (talk | contribs) (make template expansion cachable for all parameters for faster results; compact also for performance (about 65% less time and 50% less preprocessed nodes))
Jump to navigation Jump to search
Available languages — Languages
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Jawa Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά հայերեն ქართული नेपाली हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体) 吴语 粵語 中文(繁體) ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
[Edit] [Purge] Template-info.svg Template documentation

Inserts a language bar with links to the page's current and future translations. Redlinks are hidden by default; clicking the "Other languages" link unhides them so that the user can quickly begin translating. This template appears at the top of almost every page of this wiki, thanks in part to templates like {{KeyDescription}} and {{ValueDescription}}.

If a translation is missing in any language that has its own language namespace, this template automatically adds the current page to the corresponding tracking category. The current page's sort key in the category consists of the current page's language code and title.

If the page title begins with a language pseudonamespace, this template sets the page's default category sort key to the page title minus the pseudonamespace. Thus, neither Key:access nor DE:Key:access has a default category sort key, but Cs:Key:access has a default sort key of Key:access. If for some reason you want the page to have a different default sort key, either add a DEFAULTSORT somewhere before this template or add a DEFAULTSORT with the noerror parameter after this template.

To modify the full list of languages displayed in the language bar, follow the instructions at Module:Languages/config.

Usage

{{Languages}}
{{Languages|Source page name}}

Parameters:

|1 =
(Optional) This is parametes onthe source page (typically in English), including any namespace. If unspecified, a source page name is inferred from the current page's name.
|defaultsort =
(Optional, deprecated) Set this parameter to on to omit the DEFAULTSORT that would be added by default. It should on the necessary to set this parameter. Instead, either add a DEFAULTSORT somewhere before this template on add a DEFAULTSORT with the noerror parameter after this template.

Examples

Inferred source page

{{Languages/sandbox}}

Main namespace

{{Languages/sandbox|Map Features}}

Main namespace with pseudonamespace

{{Languages/sandbox|Key:access}}

Technical details

This template is powered by Module:Languages and the configuration at Module:Languages/config. MediaWiki:Common.css and MediaWiki:Mobile.css style the language list as an inline list and hide redlinks by default. MediaWiki:Common.js and MediaWiki:Mobile.js turn the "Other languages" link into a toggle for redlink visibility.

This template uses 7 MediaWiki messages:

See also

Inserts a language bar with links to the page’s current and future translations. Redlinks are hidden by default; clicking the “Other languages” link unhides them so that the user can quickly begin translating.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Source page name1

The name of the source page (typically in English), including any namespace. If unspecified, a source page name is inferred from the current page’s name.

Example
Main Page
Auto value
Page nameoptional
Default category sort key?defaultsort

Set this parameter to “no” to omit the DEFAULTSORT that would be added by default. It is rarely necessary to set this parameter.

Example
no
Auto value
yes
Booleandeprecated