Jump to content

Template:Format

From translatewiki.net
The documentation of this template is included from its /doc subpage.
Usage:
In message documentation.
Parameters:
  • 1= output method as one of: plain, text, or jquerymsg. If the format is "parse", then you don't need to add this documentation template, because that is the default expected by translators.
Example:
  • {{Format|plain}} generates:
This is a plain message that does not support any wikitext formatting.
The following features are not allowed: MediaWiki magic words (such as {{SITENAME}}), parser functions (such as {{PLURAL:}}, {{GENDER:}}), wikitext markup (such as '''bold text''', [[wikilink|text]]), HTML markup (such as <span lang="en">foo</span>), HTML character entities (such as &zwsp;, &#123;).

Due to limitations in the software using this message, only three very specific HTML character entities allowed even in plain mode; they are:

  • &#32; (regular space)
  • &nbsp; (non-breaking space, named)
  • &#160; (non-breaking space, numerical)
Example:
  • {{Format|text}} generates:

This is a text message that does not support rich text formatting. Wikitext or HTML markup is not supported (such as '''bold text''', [[wikilink|text]]). Magic words and parser functions, however, are supported (such as {{PLURAL:}}, {{GENDER:}}).

Example:
  • {{Format|jquerymsg}} generates:
This is a jquerymsg message that only supports limited wikitext formatting. See detailed documentation.
Only the following features are supported:
  • Placeholder variables, like $1, $2, etc.
  • Magic words: Only select magic words, including {{SITENAME}}
  • Parser functions: Only select parser functions, including {{PLURAL:}}, {{GENDER:}} and {{GRAMMAR:}}
  • Wikitext markup: Only [[internal link]], [https://example.org external] links
  • HTML markup such as <i>italic</i> and <b>bold</b> is allowed, but tags must be well-formed
  • No lists or multiple paragraphs (unless using HTML markup)
Example:
  • {{Format|parse}} generates:

This message supports wikitext formatting.

See also: