Template:Int

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

⧼{{{1}}}⧽

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Int/doc.

Shows a MediaWiki message in the same language of the page (identified by the subpage name) within a translated page, or the language specified using the |lang= parameter; 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.

Not to be confused with {{int:XXX}}, which always shows the message in the language chosen by the user in their preferences.

Usage

{{int |lang= |1= }}

Template parameters

<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.

Discussion
There is an ongoing discussion about that matter. Feel invited to comment if you are experienced in either way, your time permits and if you like to share your opinion or to make a suggestion.


Wikipedia's help about TemplateDataCommons-specific information

Renders a MediaWiki interface message in the page language.

Template parameters

ParameterDescriptionTypeStatus
Languagelang

The language to show the message in. Note that {{TRANSLATIONLANGUAGE}} is only valid inside translate tags.

Default
{{PAGELANGUAGE}}
Auto value
{{TRANSLATIONLANGUAGE}}
Stringsuggested
Interface Message Name1

The name of the MediaWiki interface message (without the “MediaWiki:” namespace prefix)

Stringrequired
Missing Value Defaultmissing

The value to return when the MediaWiki interface message does not exist.

Default
⧼{{{1}}}⧽
Contentsuggested
Replacement 12

The replacement string for “$1”.

Contentoptional
Replacement 23

The replacement string for “$2”.

Contentoptional
Replacement 34

The replacement string for “$3”.

Contentoptional
Replacement 45

The replacement string for “$4”.

Contentoptional
Replacement 56

The replacement string for “$5”.

Contentoptional
Replacement 67

The replacement string for “$6”.

Contentoptional
Replacement 78

The replacement string for “$7”.

Contentoptional
Replacement 89

The replacement string for “$8”.

Contentoptional
Replacement 910

The replacement string for “$9”.

Contentoptional
Edit parameter translations

Additional information

The template is intended to be used in the following namespaces: all namespaces

The template is intended to be used by the following user groups: all users

Relies on:

  • Module:Int
  • {{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)

Localization

This template is not intended to be localized.