Template:Int

From OpenStreetMap Wiki
Jump to: navigation, search
[Edit] [Octicons-sync.svgpurge] Template-info.svg Template documentation

Usage

  • {{Int|name}}
Same as {{Int:name}} but uses the language of the current page infered by {{Langcode}} (instead of the user language), supporting standard fallbacks supported by MediaWiki.
  • {{Int|name|lang=code}}
Same as {{Int:name}} but allows specifying a specific language code (instead of the user language), supporting standard fallbacks supported by MediaWiki.

Note that if there's no defined translations at all for name (in MediaWiki:name), this template will return the given name with only its first letter capitalized. This template is not intended to give translations of translatable messages that are not defined in the MediaWiki UI.

Examples

  • {{Int:show}} returns "Show" (in the current user language selected in the UI or from user preferences)
  • {{Int|show}} returns "Show" (in the language of the current page)
  • {{Int|show|lang=de}} returns "einblenden" (in standard German)
  • {{Int|show|lang=de-formal}} returns "einblenden" (in formal German, falling back to standard German)
  • {{Int|show|lang=de-informal}} returns "Show" (in informal German, falling back to English as there's no standard fallback for it in the local instance of MediaWiki)

Note

The code of this template uses complex syntax, but its performance is very good (its execution time unnoticeable), and it does not require any costly parser function.

See also