Template:Text

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

This template produces certain text, given by the English version or a code, in a given language. By default, the fall-back language is English. Optionally this is suppressed, and the template produces nothing if the text is not available in the desired language. This can be useful if the English version is given anyway, with another call of the template.

Contents

[edit] Parameters

Parameter name Description Default value
1 code for the text to be produced empty
2 language code for the language in which the text is expressed the result of {{uselang}} , giving en
3 if non-empty: do not produce the English word if the word in the requested language is not available; instead, produce nothing empty

Examples

Some results depend on the user language, try: deenfrnl

  • {{text}}
  • {{text|sa}} → See also
  • {{text|see}} → See
  • {{text|xmp}} → Examples
  • {{text|req}} → Required
  • {{text|sa|de}} → See also
  • {{text|sa|en}} → See also
  • {{text|sa|nl}} → Zie ook
  • {{text|sa||x}} → See also
  • {{text|sa|de|x}}
  • {{text|sa|en|x}} → See also
  • {{text|sa|nl|x}} → Zie ook

If the subtemplate for the language in which the name is expressed is known to exist, and fall-back to English if the text is not available is not desired, then the subtemplate can more efficiently be called directly as follows:

  • {{text/en|sa}} → See also
  • {{text/nl|sa}} → Zie ook

Formatting a number:

  • 12{{text|,}}345{{text|.}}67 → 12,345.67

Compare:

  • {{formatnum|12345.67}} → 12,345.67

Required

  • The page MediaWiki:Lang/xx for the user language xx set in the preferences; it should contain the language code xx
Lang/af Lang/de Lang/en
Lang/fr Lang/nl Lang/pl
  • Template:Text/xx for the language in which the text is expressed (see below), with in that page support for the text to be produced

Localization

This template calls Template:Text/en. The following language versions are available:

Each calls Template:Text/layout.

See also

Personal tools
Namespaces

Variants
Actions
Navigation
Community
Beyond the Web
Toolbox