Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 23:41, 25 August 2021 by commons>ExE Boss (Template parameters: Rename the parameters: `2` → `missing` (with alias) – conflicts with {{localized mw message}} (Q86596927))

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

The template automatically sets the following categories:

Usage

{{Int |1= |missing= |lang= }}

Template parameters

ParameterDescriptionDefaultStatus
1Nameidentifier of the resource (in the "MediaWiki:" namespace)emptyrequired
missing
2
Missing Value Defaultan alternate string to return if the resource is not found.emptysuggested
langLanguage CodeA 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
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. ‎<nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw ‎<templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

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

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Name1

identifier of the resource (in the "MediaWiki:" namespace)

Stringrequired
Language Codelang

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)

Default
{{PAGELANGUAGE}}
Stringoptional
Missing Value Defaultmissing 2

an alternate string to return if the resource is not found.

Contentsuggested

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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.