Template:Langx
| Warning | This template is used on approximately 666,000 pages, or roughly 47301% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| {{#ifeq: n|n|icon|icon}} | {{#ifeq: n|n
|This template should not be used in citation templates such as Citation Style 1 and Citation Style 2, because it includes markup that will pollute the COinS metadata they produce; see Wikipedia:COinS. {{safesubst:#if:{{safesubst:#ifeq:Langx|sandbox|1}}{{safesubst:#ifeq:Langx|doc|1}}||}} |This template is safe for use in citation templates that produce COinS metadata; see Wikipedia:COinS. If HTML or other markup is added, then its use must be reevaluated.}} |
| File:Information icon4.svg | This template {{#switch:never|may=may be substituted|never=should not be substituted||#default=should always be substituted – use {{#switch:
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes }} |Any accidental transclusions will be automatically substituted by a bot.{{#if:{{safesubst:#switch: |no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes}}||{{#switch:Langx|doc|sandbox=|}}}}}} {{#if: |For transcluding, use {{[[Template:|]]}} instead.}} |
|no |n |f |false |off |0 = | = |¬ = |yes |y |t |true |on |1 = yes |#default = yes
}}||{{#switch:Langx|doc|sandbox=|{{#switch:never |never= |may= |#default={{#ifexpr: 0Template:Find page text > 0 | }} }}}}}}
| {{#if: |[[File:{{{image}}}|40px|Notice|alt=]]}} | {{#if: | ' }}After a discussion in 2024, most of the {{lang-??}} templates were replaced by {{langx}}. | {{#if: |{{{imageright}}} |{{#if: |Error: no shortcuts were specified and the |msg= parameter was not set.}} }} |
| {{ safesubst:#titleparts:{{ safesubst:#if:|{{{1}}}|Template:Langx}}|1}}
| {{ safesubst:#if:|{{{1}}}|Template:Langx}}
}}|}} {{#ifeq:langx |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:Langx
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
| File:Lua-Logo.svg | This template uses Lua: |
Lua error in Module:Navbar at line 58: Invalid title {{#if: |{{{templatename}}} |Language templates }}.
This language template identifies non-English text. It is very similar to {{lang}} but inserts the name of the language as a label. The text is formatted according to recommendations in Wikipedia:Manual of Style/Text formatting § Foreign terms: italics for languages that use the Latin alphabet, normal for others.
Usage
An IETF language tag and the non-English term or phrase are the only required parameters.
The template should generally be placed after the English translation of the foreign term or phrase.
- The parameter
|{{SAFESUBST:#if:links|links=}}noprevents the language name from being linked. - The parameter
|{{SAFESUBST:#if:translit|translit=}}allows for a romanization. This parameter is not supported by{{langx|<tag>|...}}templates for languages that are already written in Latin script. - The parameter
|{{SAFESUBST:#if:lit|lit=}}enables a literal translation (in English) to be given.
Parameters
| Parameter | Definition | Yields to | Alias |
|---|---|---|---|
| 1=}} | The IETF language tag for the content in |{{SAFESUBST:#if:text|text=}} |
— | code=}} |
| text=}} | The non-English text | — | 2=}} |
| translit=}} | text=}} | — | 3=}} |
| translit-std=}} | translit=}}; accepted values are: 25|white-space: wrap;|}} ">Abkai, 25|white-space: wrap;|}} ">ahl, 25|white-space: wrap;|}} ">ALA, 25|white-space: wrap;|}} ">ALA-LC, 25|white-space: wrap;|}} ">batr, 25|white-space: wrap;|}} ">bgn/pcgn, 25|white-space: wrap;|}} ">DIN, 25|white-space: wrap;|}} ">eae, 25|white-space: wrap;|}} ">hepburn, 25|white-space: wrap;|}} ">hu, 25|white-space: wrap;|}} ">hunterian, 25|white-space: wrap;|}} ">IAST, 25|white-space: wrap;|}} ">ISO, 25|white-space: wrap;|}} ">jyutping, 25|white-space: wrap;|}} ">mdorff, 25|white-space: wrap;|}} ">mlcts, 25|white-space: wrap;|}} ">mr, 25|white-space: wrap;|}} ">nihon-shiki, 25|white-space: wrap;|}} ">no_std, 25|white-space: wrap;|}} ">pinyin, 25|white-space: wrap;|}} ">rr, 25|white-space: wrap;|}} ">rtgs, 25|white-space: wrap;|}} ">satts, 25|white-space: wrap;|}} ">scientific, 25|white-space: wrap;|}} ">ukrainian, 25|white-space: wrap;|}} ">ungegn, 25|white-space: wrap;|}} ">wadegile, 25|white-space: wrap;|}} ">wehr, 25|white-space: wrap;|}} ">yaleko |
— | |
| translit-script=}} | The transliteration standard's script identifier | — | |
| translation=}} | text=}}. Will be surrounded in single-quotes. The text will be tagged with CSS class <syntaxhighlight lang="text" class="" style="" inline="1">gloss-text</syntaxhighlight> and the quotes with <syntaxhighlight lang="text" class="" style="" inline="1">gloss-quot</syntaxhighlight>, like how {{gloss}} does it, enabling customization in user stylesheets. | — | lit=}}, |{{SAFESUBST:#if:4|4=}}
|
| label=}} | white-space: wrap;|}} ">none causes the template to render without any labels (including transliteration and translation labels) | — | |
| link=}} | translit=}} and |{{SAFESUBST:#if:translation|translation=}}. Defaults to 25|white-space: wrap;|}} ">yes. Accepted values are: 25|white-space: wrap;|}} ">no, 25|white-space: wrap;|}} ">yes; |{{SAFESUBST:#if:link|link=}}no does not unlink wikilinked labels set by |{{SAFESUBST:#if:label|label=}} |
— | links=}} |
| proto=}} | white-space: wrap;|}} ">no (default) or 25|white-space: wrap;|}} ">yes (default for private-use language tags with the 25|white-space: wrap;|}} ">-x-proto subtags); when 25|white-space: wrap;|}} ">yes (default or explicit), prefixes rendered text with an asterisk indicating 'unattested' |
— | |
| script=}} | 1=}}) IETF language script subtag; sometimes set by the template when the language of the content in |{{SAFESUBST:#if:text|text=}} uses more than one writing system; always four alpha characters; a value of 25|white-space: wrap;|}} ">Latn (not "Latin"!) forces italic rendering unless overridden by |{{SAFESUBST:#if:italic|italic=}}; overrides |{{SAFESUBST:#if:rtl|rtl=}} |
italic=}} | |
| region=}} | 1=}}) IETF language region subtag | — | |
| variant=}} | 1=}}) IETF language variant subtag | — | |
| rtl=}} | white-space: wrap;|}} ">yes indicates that the writing system used for the content in |{{SAFESUBST:#if:text|text=}} is right-to-left; accepted values are: 25|white-space: wrap;|}} ">no (default), 25|white-space: wrap;|}} ">yes |
script=}} | |
| italic=}} | ; accepted values are: 25|white-space: wrap;|}} ">yes, 25|white-space: wrap;|}} ">no, 25|white-space: wrap;|}} ">unset, 25|white-space: wrap;|}} ">invert, 25|white-space: wrap;|}} ">default |
— | italics=}}, |{{SAFESUBST:#if:i|i=}}
|
| size=}} | text=}}; use a value suitable for use with the CSS font-size property; this should almost always be a relative value supplied in 25|white-space: wrap;|}} color: var(--color-content-added, #006400);">% or 25|white-space: wrap;|}} color: var(--color-content-added, #006400);">em units, not a fixed 25|white-space: wrap;|}} color: var(--color-content-removed, #8B0000);">px value. |
— | |
| engvar=}} | white-space: wrap;|}} ">au (Australia), 25|white-space: wrap;|}} ">ca (Canada), 25|white-space: wrap;|}} ">gb (Great Britain), 25|white-space: wrap;|}} ">ie (Ireland), 25|white-space: wrap;|}} ">in (India), 25|white-space: wrap;|}} ">nz (New Zealand), 25|white-space: wrap;|}} ">us (United States), 25|white-space: wrap;|}} ">za (South Africa) |
— | |
| cat=}} | nocat=}}; accepted values are: 25|white-space: wrap;|}} ">no, 25|white-space: wrap;|}} ">n, 25|white-space: wrap;|}} ">false, 25|white-space: wrap;|}} ">f, 25|white-space: wrap;|}} ">off, 25|white-space: wrap;|}} ">0 |
— | |
| nocat=}} | cat=}}; accepted values are: 25|white-space: wrap;|}} ">yes, 25|white-space: wrap;|}} ">y, 25|white-space: wrap;|}} ">true, 25|white-space: wrap;|}} ">t, 25|white-space: wrap;|}} ">on, 25|white-space: wrap;|}} ">1 |
— |
| italic=}} value | Description | Example code | Result | HTML markup | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{safesubst:#if:
|
|
{{safesubst:#if:
|
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | |||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> Incorrect markup; this requires script subtag 25|white-space: wrap;|}} ">-latn.
| |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">French: toundra</syntaxhighlight> | French: toundra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">French: toundra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
25|white-space: wrap;|}} ">default
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | ||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">French: toundra</syntaxhighlight> | French: toundra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">French: toundra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
25|white-space: wrap;|}} ">no
|
{{safesubst:#if:
|
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | ||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">French: toundra</syntaxhighlight> | French: toundra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">French: toundra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
25|white-space: wrap;|}} ">yes
|
{{safesubst:#if:
|
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | ||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
25|white-space: wrap;|}} ">unset
|
{{safesubst:#if:
|
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | ||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
25|white-space: wrap;|}} ">invert
|
{{safesubst:#if:
|
<ref name="invertunset" group="{{safesubst:#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}"></ref> |
<ref group="{{safesubst:#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}"></ref> }}
|
|
<ref name="invertunset" group="{{safesubst:#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}"></ref> |
<ref group="{{safesubst:#switch: | note | upper-alpha | upper-roman | lower-alpha | lower-greek | lower-roman = | #default = lower-alpha
}}"></ref> }}
|
<syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> |
| <syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> | Russian: тундра | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: тундра</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> | |||||||||||||||||||||||||||||||||||
| <syntaxhighlight lang="wikitext" inline="1">Russian: tûndra</syntaxhighlight> | Russian: tûndra | <syntaxhighlight lang="wikitext" class="" style="" inline="1">Russian: tûndra</syntaxhighlight> |
Notes
}}{{#if:|
| {{#iferror: {{#ifexpr: > 1 }} |style="column-width: calc( 0.9 * );"}}
| {{#if: |style="column-width: calc( 0.9 * {{{colwidth}}} );"}}
}}><references group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}" responsive="0">{{safesubst:#if:invertunset
|<ref name="invertunset" group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}"></ref>
|<ref group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}"></ref>
}}</references>|
<references group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}" responsive="1">{{safesubst:#if:invertunset
|<ref name="invertunset" group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}"></ref>
|<ref group="{{safesubst:#switch:
| note
| upper-alpha
| upper-roman
| lower-alpha
| lower-greek
| lower-roman =
| #default = lower-alpha
}}"></ref>
}}</references>TemplateData
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Langx|Template:Langx|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Langx|Template:Langx|Template:Langx}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}.
|#default=[1]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}} }}|This is the {{#if:|TemplateData|TemplateData}} for this template used by TemplateWizard, VisualEditor and other tools. {{#switch:
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:Langx|Template:Langx|this template}} in articles{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ALangx%7CLangx%7CLangx%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|no|P|p}}arameter usage report] for {{#if:Langx|Template:Langx|Template:Langx}}{{#ifeq:{{safesubst:#switch: y
|no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}}.
|#default=[2]{{#ifeq:{{safesubst:#switch: y |no |n |f |false |off |0 = no | = no |¬ = no |yes |y |t |true |on |1 = yes |#default = no
}}|yes| based on {{#if:Langx|its|this}} TemplateData}} }}}}
TemplateData for Langx
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = {{safesubst:#if:{{safesubst:#ifeq:Langx|sandbox|1}}{{safesubst:#ifeq:Langx|doc|1}}||
}} | other | #default = }} <templatedata> { "params": { "1": { "label": "Language tag", "description": "A valid IETF language tag identifying the language of the non-English text. E.g. \"ja\" for Japanese.", "type": "string", "required": true, "example": "ja" }, "2": { "label": "Text", "description": "The non-English text to display. E.g. \"東京都\" means \"Tokyo\" in Japanese.", "type": "string", "required": true, "example": "東京都" }, "3": { "label": "Transliteration", "description": "The transliteration of the foreign text, for languages that do not use the Latin alphabet. This field is ignored for languages that do use the Latin alphabet. E.g. \"Tōkyō\" is the standardized romanization of \"Tokyo\".", "type": "string", "aliases": [ "translit" ], "example": "Tōkyō" }, "4": { "label": "Literal translation", "description": "The literal translation of the foreign text. E.g. \"Tokyo\" means \"eastern capital\".", "type": "string", "aliases": [ "lit", "translation" ], "example": "eastern capital" }, "links": { "label": "Display link", "description": "Set to 'no' to disable the link to the article's language.", "type": "boolean", "aliases": [ "link" ], "default": "yes", "autovalue": "no" }, "label": { "label": "Language label", "description": "If 'none', suppresses language link and label. Other options may be available depending on the language.", "example": "none", "type": "line" }, "rtl": { "label": "Right-to-left", "description": "Toggle right-to-left view for the foreign text.", "type": "boolean", "example": "yes", "default": "no" }, "italic": { "label": "Italicize", "description": "Toggle italicization for the foreign text.", "type": "boolean", "default": "yes", "example": "no", "aliases": [ "italics", "i" ] }, "size": { "label": "Font-size", "description": "Sets font-size for the foreign text.", "example": "120%, 1.2em" }, "engvar": { "label": "English variant", "description": "Spelling of 'romanized/romanised'.", "type": "string", "suggestedvalues": [ "au", "ca", "gb", "ie", "in", "nz", "us", "za" ] } }, "description": "Indicates to readers the original form of a term or phrase in a foreign language.", "paramOrder": [ "1", "2", "3", "4", "links", "label", "rtl", "italic", "size", "engvar" ] } </templatedata>
Examples
The following examples show translations from German or French.
- <syntaxhighlight lang="wikitext">Weimar is located in the federal state of Thuringia ({{Langx|de|Thüringen}}).</syntaxhighlight>Weimar is located in the federal state of Thuringia (German: Thüringen).
- <syntaxhighlight lang="wikitext">The Seafarers of Catan ({{Langx|de|Die Seefahrer von Catan}}) is an expansion of the board game The Settlers of Catan.</syntaxhighlight>The Seafarers of Catan (German: Die Seefahrer von Catan) is an expansion of the board game The Settlers of Catan.
- <syntaxhighlight lang="wikitext">Albert the Bear ({{Langx|de|Albrecht der Bär|links=no}})</syntaxhighlight>Albert the Bear (German: Albrecht der Bär)
- <syntaxhighlight lang="wikitext">All Quiet on the Western Front ({{Langx|de|Im Westen nichts Neues|lit=In the West Nothing New}}) is a novel by Erich Maria Remarque.</syntaxhighlight>All Quiet on the Western Front (German: Im Westen nichts Neues, lit. 'In the West Nothing New') is a novel by Erich Maria Remarque.
- <syntaxhighlight lang="wikitext">Paris Cité University ({{langx|fr|links=no|Université Paris Cité}}) is a public research university</syntaxhighlight>Paris Cité University (French: Université Paris Cité) is a public research university
Comparison with the Lang template
This template differs from the {{lang}} template in that this one labels the text with the name of the language. For that reason, to avoid unnecessary clutter, this template should be used sparingly, in cases where the name of the language should be made explicit, such as the first place in an article that the translation of a word or phrase in English is given, or when renderings in multiple languages are being given and confusion is possible in the absence of such labeling.
Comparison:
- <syntaxhighlight lang="wikitext" inline="1">тундра</syntaxhighlight> produces тундра
- <syntaxhighlight lang="wikitext" inline="1">Russian: тундра</syntaxhighlight> produces Russian: тундра
- <syntaxhighlight lang="wikitext" inline="1">тундра</syntaxhighlight> produces тундра
Tracking categories
- {{#if:|{{{name}}}|Category:Lang and lang-xx template errors}} (17)
- {{#if:|{{{name}}}|Category:Lang and lang-xx code promoted to ISO 639-1}} (0)
- {{#if:|{{{name}}}|Category:Lang and lang-xx using deprecated ISO 639 codes}} (0)
TODO: (2024-09-22) rename these categories
See also
- {{crh}} – Supports Latin, Cyrillic, and Arabic Crimean Tatar text
- {{Lang}}
- {{Language with name/for}}
- List of ISO 639 language codes (language codes)
- {{IPA}}
{{safesubst:#if:{{safesubst:#ifeq:Langx|sandbox|1}}{{safesubst:#ifeq:Langx|doc|1}}|| }}
- Pages with script errors
- Pages with broken file links
- Templates not safe for use in citation templates
- Wikipedia message box parameter needs fixing
- Wikipedia templates to be automatically substituted
- Wikipedia never-substituted templates
- Wikipedia substituted templates
- Templates with matching hidden id
- Shortcut templates with missing parameters
- Documentation subpages without corresponding pages
- Lua-based templates
- Templates using TemplateData
- Wikipedia multilingual support templates
- Templates that add a tracking category
- Language tag handling templates