Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:MC/English variant abbreviation/doc

Template page
Revision as of 12:45, 11 December 2025 by imported>RedX
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Documentation header Template:Shortcut This template generates short names for English language variants (British English, American English, Australian English etc.), with an explanatory tooltip that shows the full name of the variant when the user hovers over it with the mouse cursor. It is primatily intended to be used in the "Other names" section in infoboxes for blocks, items, biomes, enchantments and more.

Usage

Anonymous parameters

The template takes an unlimited amount of unnamed parameters, each representing an English language variant. However, only the values listed in the "Known parameters" table below will have a tooltip generated for them. All other values will have the tooltip set to <unknown>.

Note that these values are not case-sensitive, unless the noupper parameter is set (see the "Named parameters" section below). For example, gb has the same meaning as GB.

Known parameters
Parameter English variant Output
AU Australian English Template:English variant abbreviation
CA Canadian English Template:English variant abbreviation
GB or UK British English Template:English variant abbreviation or Template:English variant abbreviation
NZ New Zealand English Template:English variant abbreviation
US American English Template:English variant abbreviation

Named parameters

The template also takes the following named parameters. These parameters are case-sensitive.

Named parameters
Parameter Description
noupper By default, this template converts all of the provided values to be uppercase. If this parameter is set, the values will not be converted to uppercase.

Example: Template:Tl generates Template:English variant abbreviation instead of Template:English variant abbreviation.

nowrap If this parameter is set, the generated text will not wrap into multiple lines under any circumstances.

Equivalent to: <syntaxhighlight lang="wikitext">Template:...</syntaxhighlight>

small If this parameter is set, the template will use a smaller font size.

Example: Template:English variant abbreviationTemplate:English variant abbreviation

noparen If this parameter is set, the template will not add parentheses to the text.

Example: Template:English variant abbreviationTemplate:English variant abbreviation

nocomma If this parameter is set, the template will not add commas between multiple variant codes. This parameter is only effective if at least two variant codes are provided.

Example: Template:English variant abbreviationTemplate:English variant abbreviation

Examples

NOTE: The shortcuts Template:Tl or Template:Tl can also be used instead of the full name Template:Tl.

Example #1 – One language variant
<syntaxhighlight lang="wikitext">Jacket Potato Template:Evb</syntaxhighlight> generates:
Jacket Potato Template:Evb
Example #2 – Two language variants
<syntaxhighlight lang="wikitext">Roast Chicken Template:Evb</syntaxhighlight> generates:
Roast Chicken Template:Evb
Example #3 – Three language variants, with small text and no line wrapping
<syntaxhighlight lang="wikitext">Biscuit Template:Evb</syntaxhighlight> generates:
Biscuit Template:Evb
Example #4 – Two language variants, with lowercase names and no parentheses
<syntaxhighlight lang="wikitext">Template:Evb</syntaxhighlight> generates:
Template:Evb