Jump to content

Template:Text

From Meta, a Wikimedia project coordination wiki
Template documentation

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.

Parameters

[edit]
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

  • {{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}}
  • {{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

  • 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:

Other languages:

Each calls Template:Text/layout.

See also