Jump to content
Toggle menu
  • 3 articles
  • 75 files
  • 7 users
  • 37.9K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Int/doc: Difference between revisions

Template page
←Created page with '{{TemplateBox |name = Int |desc = This is a wrapper for searching MediaWiki translations in MediaWiki:*/lang, to be used instead of <nowiki>{{int:Name/lang}...'
 
Use main {{TemplateBox}}
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{TemplateBox
{{TemplateBox
  |name = Int
| name = int
  |desc = 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
| mbox =
{{tsh|localized mw message}}
{{Lua|Module:Int}}


  |1        = lang<!-- Name of the first parameter the template takes -->
| desc-en =
  |1label  = language<!-- A (very) brief name for the parameter. -->
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 {{para|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.
  |1d-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)
  |1type    = string/line
  |1def    = <nowiki>{{PAGELANGUAGE}}</nowiki>
  |1stat    = optional


  |2        = 1
Not to be confused with {{magic word|code=1|nowrap=1|int|XXX}}, which always shows the message in the language chosen by the user in their [[Special:Preferences#mw-prefsection-personal|preferences]].
  |2label  = Name
  |2d-en    = identifier of the resource (in the "MediaWiki:" namespace)
  |2type    = string/line
  |2def    =
  |2stat    = required


  |3        = 2
| namespace = all
  |3label  = Default
| usergroup = all
  |3d-en    = an alternate string to return if the resource is not found.
  |3type    = string
  |3def    =
  |3stat    = required


  |namespace          =
| relieson =
  |usergroup          =
* [[Module:Int]]
  |placement          =
* {{magic word|mono=1|nowrap=1|int|*/lang}} builtin parser function
  |example-value      =
* 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)
  |mustbesubst        =
  |relieson          =
* Mediawiki:*/lang
  |usage-notes        =


  |shorthand          =
| i18n-method = -
  |setscats          =
| i18n-desc =
  |seealso            =
  |type              =


  |i18n-desc          =
| print = line
  |i18n-subpage      =
| useTemplateData = TNT
  |i18n-mediawiki-msg =
  |i18n-method        =


  |example            =
| 1 = lang
  |print              =
| 2 = 1
}}
}}
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Navigational templates for the translate extension|* {{PAGENAME}}]]
}}</includeonly>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.