Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Community portal
Recent changes
Random page
Help
Special pages
Donate
Islamd Wiki
Search
Search
English
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Langx/doc
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Page information
In other projects
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{High-use}} {{COinS safe|n}} {{No subst}} {{notice|text=After a [[Wikipedia:Templates for discussion/Log/2024 September 27#Replace and delete lang-?? templates|discussion in 2024]], most of the {{tld|lang-??}} templates were replaced by {{tlx|langx}}.}} {{Documentation subpage}} {{Lua|Module:Lang}} {{Language templates}} This language template identifies non-English text. It is very similar to {{tl|lang}} but inserts the name of the language as a label. The text is formatted according to recommendations in {{section link|Wikipedia:Manual of Style/Text formatting#Foreign terms}}: italics for languages that use the [[Latin alphabet]]<!-- Not the same thing as Romance languages and Latinate languages-->, 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 {{Para|links|no}} prevents the language name from being linked. * The parameter {{Para|translit}} allows for a [[romanization]]. This parameter is not supported by {{tld|langx|<{{var|tag}}>|...}} templates for languages that are already written in Latin script. * The parameter {{Para|lit}} enables a literal translation (in English) to be given. == Parameters == {| class="wikitable" |+ Langx supported parameters ! Parameter ! Definition ! Yields to ! Alias |- | {{para|1}} || The [[IETF language tag]] for the content in {{para|text}} || {{sdash}} || {{para|code}} |- | {{para|text}} || The non-English text || {{sdash}} || {{para|2}} |- | {{para|translit}} || The Latin script transliteration of the content in {{para|text}} || {{sdash}} || {{para|3}} |- | {{para|translit-std}} || The standard used for the transliteration of the value of {{para|translit}}; accepted values are: {{param value|Abkai}}, {{param value|ahl}}, {{param value|ALA}}, {{param value|ALA-LC}}, {{param value|batr}}, {{param value|bgn/pcgn}}, {{param value|DIN}}, {{param value|eae}}, {{param value|hepburn}}, {{param value|hu}}, {{param value|hunterian}}, {{param value|IAST}}, {{param value|ISO}}, {{param value|jyutping}}, {{param value|mdorff}}, {{param value|mlcts}}, {{param value|mr}}, {{param value|nihon-shiki}}, {{param value|no_std}}, {{param value|pinyin}}, {{param value|rr}}, {{param value|rtgs}}, {{param value|satts}}, {{param value|scientific}}, {{param value|ukrainian}}, {{param value|ungegn}}, {{param value|wadegile}}, {{param value|wehr}}, {{param value|yaleko}} || {{sdash}} || |- | {{nowrap|{{para|translit-script}}}} || The transliteration standard's script identifier || {{sdash}} || |- | {{para|translation}} || The literal English translation or gloss of the content in {{para|text}}. Will be surrounded in single-quotes. The text will be tagged with CSS class {{code|gloss-text}} and the quotes with {{code|gloss-quot}}, like how {{tl|gloss}} does it, enabling customization in [[Help:User style|user stylesheets]]. || {{sdash}} || {{para|lit}}, {{para|4}} |- | {{para|label}} || The label to be used instead of template-provided language label. May be wikilinked. Special keyword {{param value|none}} causes the template to render without any labels (including transliteration and translation labels) || {{sdash}} || |- | {{para|link}} || Links language name and static text associated with {{para|translit}} and {{para|translation}}. Defaults to {{param value|yes}}. Accepted values are: {{param value|no}}, {{param value|yes}}; {{para|link|no}} does not unlink wikilinked labels set by {{para|label}} || {{sdash}} || {{para|links}} |- | {{para|proto}} || Accepted values are: {{param value|no}} (default) or {{param value|yes}} (default for private-use language tags with the {{param value|-x-proto}} subtags); when {{param value|yes}} (default or explicit), prefixes rendered text with an asterisk indicating 'unattested' || {{sdash}} || |- | {{para|red=y|script}} || (Deprecated – include script subtag in {{para|1}}) IETF language script subtag; sometimes set by the template when the language of the content in {{para|text}} uses more than one writing system; always four alpha characters; a value of {{param value|Latn}} <small>({{em|not}} "Latin"!)</small> forces italic rendering unless overridden by {{para|italic}}; overrides {{para|rtl}} || {{nowrap|{{para|italic}}}} || |- | {{para|red=y|region}} || (Deprecated – include region subtag in {{para|1}}) IETF language region subtag || {{sdash}} || |- | {{para|red=y|variant}} || (Deprecated – include variant subtag in {{para|1}}) IETF language variant subtag || {{sdash}} || |- | {{para|rtl}} || {{param value|yes}} indicates that the writing system used for the content in {{para|text}} is right-to-left; accepted values are: {{param value|no}} (default), {{param value|yes}} || {{nowrap|{{para|script}}}} || |- | {{para|italic}} || {{crossref|see table "[[#italic|Langx {{para|italic}} parameter operation]]"}}; accepted values are: {{param value|yes}}, {{param value|no}}, {{param value|unset}}, {{param value|invert}}, {{param value|default}} || {{sdash}} || {{nowrap|{{para|italics}}}}, {{para|i}} |- | {{para|size}} || Specifies font size of the content in {{para|text}}; use a value suitable for use with the CSS <code>font-size</code> property; this should almost always be a relative value supplied in {{param value|style=color: var(--color-content-added, #006400);|%}} or {{param value|style=color: var(--color-content-added, #006400);|em}} units, not a fixed {{param value|style=color: var(--color-content-removed, #8B0000);|px}} value. || {{sdash}} || |- | {{para|engvar}} || Selects English variant spelling of 'romanised' or 'romanized' (default) according to the country specified; accepted values are: {{param value|au}} (Australia), {{param value|ca}} (Canada), {{param value|gb}} (Great Britain), {{param value|ie}} (Ireland), {{param value|in}} (India), {{param value|nz}} (New Zealand), {{param value|us}} (United States), {{param value|za}} (South Africa) || {{sdash}} || |- | {{para|cat}} || Inhibits automatic categorization; mirror version of {{para|nocat}}; accepted values are: {{param value|no}}, {{param value|n}}, {{param value|false}}, {{param value|f}}, {{param value|off}}, {{param value|0}} || {{sdash}} || |- | {{para|nocat}} || Inhibits automatic categorization; mirror version of {{para|cat}}; accepted values are: {{param value|yes}}, {{param value|y}}, {{param value|true}}, {{param value|t}}, {{param value|on}}, {{param value|1}} || {{sdash}} || |- |} {| class="wikitable" |+ {{anchor|italic}}Langx {{para|italic}} parameter operation |- ! {{para|italic}} value !! Description !! Example code !! Result !! HTML markup |- | rowspan="4" | {{Plainlist| * parameter not present; * parameter present, not set; * invalid value }} | rowspan="7" | {{Plainlist| * module applies style from: * template setting, or * {{pval|-latn}} script subtag; * else inherits from external markup; * invalid values treated as default }} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра}}</syntaxhighlight> | {{langx|ru|тундра}} | {{code|lang=wikitext|{{Langx|ru|тундра}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|tûndra}}</syntaxhighlight> | {{Langx|ru|tûndra}} | {{code|lang=wikitext|{{Langx|ru|tûndra}}}}<br />Incorrect markup; this requires script subtag {{pval|-latn}}. |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|fr|toundra}}</syntaxhighlight> | {{Langx|fr|toundra}} | {{code|lang=wikitext|{{Langx|fr|toundra}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra}}</syntaxhighlight> | {{Langx|ru-latn|tûndra}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra}}}} |- | rowspan="3" | {{param value|default}} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|italic=default}}</syntaxhighlight> | {{Langx|ru|тундра|italic=default}} | {{code|lang=wikitext|{{Langx|ru|тундра|italic=default}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|fr|toundra|italic=default}}</syntaxhighlight> | {{Langx|fr|toundra|italic=default}} | {{code|lang=wikitext|{{Langx|fr|toundra|italic=default}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra|italic=default}}</syntaxhighlight> | {{Langx|ru-latn|tûndra|italic=default}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra|italic=default}}}} |- | rowspan="4" | {{param value|no}} | rowspan="4" | {{Plainlist| * module applies upright style; * overrides {{pval|-latn}} script subtag; * overrides external markup }} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|italic=no}}</syntaxhighlight> | {{Langx|ru|тундра|italic=no}} | {{code|lang=wikitext|{{Langx|ru|тундра|italic=no}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|fr|toundra|italic=no}}</syntaxhighlight> | {{Langx|fr|toundra|italic=no}} | {{code|lang=wikitext|{{Langx|fr|toundra|italic=no}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra|italic=no}}</syntaxhighlight> | {{Langx|ru-latn|tûndra|italic=no}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra|italic=no}}}} |- | <syntaxhighlight lang="wikitext" inline="1">''{{Langx|ru-latn|tûndra|italic=no}}''</syntaxhighlight> | ''{{Langx|ru-latn|tûndra|italic=no}}'' | {{code|lang=wikitext|''{{Langx|ru-latn|tûndra|italic=no}}''}} |- | rowspan="2" | {{param value|yes}} | rowspan="2" | {{Plainlist| * module applies italic style; * ignores {{pval|-latn}} script subtag }} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|italic=yes}}</syntaxhighlight> | {{Langx|ru|тундра|italic=yes}} | {{code|lang=wikitext|{{Langx|ru|тундра|italic=yes}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra|italic=yes}}</syntaxhighlight> | {{Langx|ru-latn|tûndra|italic=yes}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra|italic=yes}}}} |- | rowspan="4" | {{param value|unset}} | rowspan="4" | {{Plainlist| * module applies no style; * inherits style from external markup; * overrides {{pval|-latn}} script subtag }} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|italic=unset}}</syntaxhighlight> | {{Langx|ru|тундра|italic=unset}} | {{code|lang=wikitext|{{Langx|ru|тундра|italic=unset}}}} |- | <syntaxhighlight lang="wikitext" inline="1">''{{Langx|ru|тундра|italic=unset}}''</syntaxhighlight> | ''{{Langx|ru|тундра|italic=unset}}'' | {{code|lang=wikitext|''{{Langx|ru|тундра|italic=unset}}''}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra|italic=unset}}</syntaxhighlight> | {{Langx|ru-latn|tûndra|italic=unset}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra|italic=unset}}}} |- | <syntaxhighlight lang="wikitext" inline="1">''{{Langx|ru-latn|tûndra|italic=unset}}''</syntaxhighlight> | ''{{Langx|ru-latn|tûndra|italic=unset}}'' | {{code|lang=wikitext|''{{Langx|ru-latn|tûndra|italic=unset}}''}} |- | rowspan="4" | {{param value|invert}} | rowspan="4" | {{Plainlist| * module applies no style; * inverts style in internal markup;{{efn|name=invertunset}} * disables auto-italics; * overrides {{pval|-latn}} script subtag }} | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|italic=invert}}</syntaxhighlight> | {{Langx|ru|тундра|italic=invert}} | {{code|lang=wikitext|{{Langx|ru|тундра|italic=invert}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|''тундра''|italic=invert}}</syntaxhighlight> | {{Langx|ru|''тундра''|italic=invert}} | {{code|lang=wikitext|{{Langx|ru|''тундра''|italic=invert}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|tûndra|italic=invert}}</syntaxhighlight> | {{Langx|ru-latn|tûndra|italic=invert}} | {{code|lang=wikitext|{{Langx|ru-latn|tûndra|italic=invert}}}} |- | <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru-latn|''tûndra''|italic=invert}}</syntaxhighlight> | {{Langx|ru-latn|''tûndra''|italic=invert}} | {{code|lang=wikitext|{{Langx|ru-latn|''tûndra''|italic=invert}}}} |- |} ===Notes=== {{Notelist|refs= {{efn|name=invertunset|compare {{para|italic|invert}} to {{para|italic|unset}}: :<syntaxhighlight lang="wikitext" inline="1">{{Langx|de|... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.|italic=invert}}</syntaxhighlight> ::{{Langx|de|... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.|italic=invert}} :<syntaxhighlight lang="wikitext" inline="1">{{Langx|de|''... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.''|italic=unset}}</syntaxhighlight> ::{{Langx|de|''... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.''|italic=unset}}}} }} === TemplateData === {{TemplateData header}} <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. * {{demo|<nowiki>Weimar is located in the federal state of Thuringia ({{Langx|de|Thüringen}}).</nowiki>}} * {{demo|<nowiki>The ''Seafarers of Catan'' ({{Langx|de|Die Seefahrer von Catan}}) is an expansion of the board game ''[[The Settlers of Catan]]''.</nowiki>}} * {{demo|<nowiki>Albert the Bear ({{Langx|de|Albrecht der Bär|links=no}})</nowiki>}} *{{demo|<nowiki>''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]].</nowiki>}} * {{demo|<nowiki>'''Paris Cité University''' ({{langx|fr|links=no|'''Université Paris Cité'''}}) is a public research university</nowiki>}} == Comparison with the Lang template== This template differs from the {{tlx|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">{{Lang|ru|тундра}}</syntaxhighlight> produces {{lang|ru|тундра}} * <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра}}</syntaxhighlight> produces {{langx|ru|тундра}} * <syntaxhighlight lang="wikitext" inline="1">{{Langx|ru|тундра|label=none}}</syntaxhighlight> produces {{langx|ru|тундра|label=none}} == Tracking categories == * {{Category link with count|Lang and lang-xx template errors}} * {{Category link with count|Lang and lang-xx code promoted to ISO 639-1}} * {{Category link with count|Lang and lang-xx using deprecated ISO 639 codes}} TODO: (2024-09-22) rename these categories == See also == {{#invoke:Lang/documentor tool|see_also|{{{see-also|}}}}} * {{tl|crh}} – Supports Latin, Cyrillic, and Arabic Crimean Tatar text * {{Tl|Lang}} * {{Tl|Language with name/for}} * [[List of ISO 639 language codes]] (language codes) * {{tl|IPA}} <includeonly>{{Sandbox other|| [[Category:Wikipedia multilingual support templates]] [[Category:Templates that add a tracking category]] [[Category:Language tag handling templates]] }}</includeonly>
Summary:
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages included on this page:
Template:Always substitute
(
edit
)
Template:Anchor
(
edit
)
Template:COinS safe
(
edit
)
Template:Category link with count
(
edit
)
Template:Code
(
edit
)
Template:Crossref
(
edit
)
Template:Crossreference
(
edit
)
Template:Crossreference/styles.css
(
edit
)
Template:Demo
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Editnotice EXPECTUNUSEDTEMPLATE
(
edit
)
Template:Efn
(
edit
)
Template:Em
(
edit
)
Template:FULLROOTPAGENAME
(
edit
)
Template:Hatnote inline
(
edit
)
Template:Helpbox
(
edit
)
Template:Helpbox/styles.css
(
edit
)
Template:High-use
(
edit
)
Template:Hlist/styles.css
(
edit
)
Template:Lang
(
edit
)
Template:Language templates
(
edit
)
Template:Langx
(
edit
)
Template:Lua
(
edit
)
Template:Main other
(
edit
)
Template:Mbox
(
edit
)
Template:Never substitute
(
edit
)
Template:No subst
(
edit
)
Template:Notelist
(
edit
)
Template:Notice
(
edit
)
Template:Nowrap
(
edit
)
Template:Ns has subpages
(
edit
)
Template:Ombox
(
edit
)
Template:Para
(
edit
)
Template:Param value
(
edit
)
Template:Param value/styles.css
(
edit
)
Template:Plainlist
(
edit
)
Template:Plainlist/styles.css
(
edit
)
Template:Pval
(
edit
)
Template:Reflist
(
edit
)
Template:Reflist/styles.css
(
edit
)
Template:Replace
(
edit
)
Template:Sandbox other
(
edit
)
Template:Sdash
(
edit
)
Template:Section link
(
edit
)
Template:Sidebar
(
edit
)
Template:Str len
(
edit
)
Template:Strong
(
edit
)
Template:TemplateData header
(
edit
)
Template:Template link
(
edit
)
Template:Template link code
(
edit
)
Template:Template link expanded
(
edit
)
Template:Template other
(
edit
)
Template:Template parameter usage
(
edit
)
Template:Terminate sentence
(
edit
)
Template:Tl
(
edit
)
Template:Tld
(
edit
)
Template:Tlx
(
edit
)
Template:Var
(
edit
)
Template:Yesno
(
edit
)
Template:Yesno-no
(
edit
)
Module:Anchor
(
edit
)
Module:Arguments
(
edit
)
Module:Check for unknown parameters
(
edit
)
Module:Demo
(
edit
)
Module:Hatnote
(
edit
)
Module:Hatnote/styles.css
(
edit
)
Module:Hatnote inline
(
edit
)
Module:High-use
(
edit
)
Module:Lang
(
edit
)
Module:Lang/ISO 639 synonyms
(
edit
)
Module:Lang/configuration
(
edit
)
Module:Lang/data
(
edit
)
Module:Lang/data/iana languages
(
edit
)
Module:Lang/data/iana regions
(
edit
)
Module:Lang/data/iana scripts
(
edit
)
Module:Lang/data/iana suppressed scripts
(
edit
)
Module:Lang/data/iana variants
(
edit
)
Module:Lang/data/is latn data
(
edit
)
Module:Lang/documentor tool
(
edit
)
Module:Lang/langx
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:Navbar
(
edit
)
Module:Navbar/configuration
(
edit
)
Module:Navbar/styles.css
(
edit
)
Module:Ns has subpages
(
edit
)
Module:Section link
(
edit
)
Module:Sidebar
(
edit
)
Module:Sidebar/configuration
(
edit
)
Module:Sidebar/styles.css
(
edit
)
Module:String
(
edit
)
Module:TableTools
(
edit
)
Module:Template link general
(
edit
)
Module:Transclusion count
(
edit
)
Module:Transclusion count/data/L
(
edit
)
Module:Unicode data
(
edit
)
Module:Unsubst
(
edit
)
Module:Yesno
(
edit
)
Search
Search
Editing
Template:Langx/doc
Add languages
Add topic