Template:Int/doc: Difference between revisions
Template page
More actions
mNo edit summary |
→See also: Add link to {{localized mw message}} |
||
| Line 1: | Line 1: | ||
{{TemplateBox | {{TemplateBox | ||
| name = Int | |||
| desc-en = This is a wrapper for searching MediaWiki translations in MediaWiki:*/lang, to be used instead of <nowiki>{{int:Name/lang}}</nowiki>, allowing to look for a language; if the resource in the specified language does not exist (translation missing), it will look for a single fallback in English or with the default UI language. Otherwise it will return a default string | |||
|1 = 1 | |1 = 1 | ||
|1label = Name | |1label = Name | ||
|1d-en = identifier of the resource (in the "MediaWiki:" namespace) | |1d-en = identifier of the resource (in the "MediaWiki:" namespace) | ||
| 1type = string | |||
|1stat = required | |1stat = required | ||
| Line 12: | Line 12: | ||
|2label = Default | |2label = Default | ||
|2d-en = an alternate string to return if the resource is not found. | |2d-en = an alternate string to return if the resource is not found. | ||
| 2type = string | |||
|2stat = required | |2stat = required | ||
| Line 18: | Line 18: | ||
|3label = language<!-- A (very) brief name for the parameter. --> | |3label = language<!-- A (very) brief name for the parameter. --> | ||
|3d-en = A language code supported by MediaWiki or Translatewiki.net or a valid BCP47 language code (most often from ISO 639-1 or ISO 639-3) | |3d-en = A language code supported by MediaWiki or Translatewiki.net or a valid BCP47 language code (most often from ISO 639-1 or ISO 639-3) | ||
| 3type = string | |||
|3def = <nowiki>{{PAGELANGUAGE}}</nowiki> | |3def = <nowiki>{{PAGELANGUAGE}}</nowiki> | ||
|3stat = optional | |3stat = optional | ||
| Line 34: | Line 34: | ||
|shorthand = | |shorthand = | ||
|setscats = | |setscats = | ||
| seealso = | |||
* {{tld|nowrap=1|localized mw message}} – Uses [[Module:Int]] | |||
|type = | |type = | ||
Revision as of 12:43, 27 July 2021
This is a wrapper for searching MediaWiki translations in MediaWiki:*/lang, to be used instead of {{int:Name/lang}}, allowing to look for a language; if the resource in the specified language does not exist (translation missing), it will look for a single fallback in English or with the default UI language. Otherwise it will return a default string
Usage
{{Int |1= |2= |lang= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | Name | identifier of the resource (in the "MediaWiki:" namespace) | empty | required |
2 | Default | an alternate string to return if the resource is not found. | empty | required |
lang | language | A language code supported by MediaWiki or Translatewiki.net or a valid BCP47 language code (most often from ISO 639-1 or ISO 639-3) | {{PAGELANGUAGE}} | optional |
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Relies on:
- [[int:*/lang]] builtin parser function
- pages in "Mediawiki:*/lang" for messages translated and imported from Translatewiki.net (some resources are located in MediaWiki itself in PHP plugins, and don't need to be imported)
See also
- {{localized mw message}} – Uses Module:Int
Localization
This template is not intended to be localized.