Category:Lang and lang-xx template errors
{{Maintenance category|tracking=true|empty=true|polluted=true}}
This category is used to track {{tlx|Lang}}, {{tlx|Langx}}, and {{tld|Lang-??}} template errors and other Module:Lang-related errors. This category is used only by Module:Lang.
See List of ISO 639 language codes for many modern languages: List of ISO 639-3 codes lists all the 3-letter codes.
Error messages
Module:Lang consolidates the processing of {{tlx|Lang}} and {{tlx|Langx}} templates. As part of that, the module emits error messages when the template parameters are used inappropriately or when the data assigned to the parameters is malformed. The error messages have the form:
:[<{{var|text}}>] <{{var|error message}}> (help link)
where <{{var|text}}> is the text supplied to the template and rendered without proper html markup. Error messages are defined here:
class="wikitable plainrowheaders"
|+ Error message definitions | |
scope="col" | Error message
! scope="col" | Template ! scope="col" | Description | |
---|---|
scope="row" rowspan="2" | {{error|tag=span|missing language tag}}
| {{tld|Lang}} || | |
{{tld|Langx}} | {{para|code}} in the template's module is empty |
scope="row" rowspan="2" | {{error|tag=span|unrecognized language tag: <tag>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized language code: <code>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized script: <script> for code: <code>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized region: <region> for code: <code>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized variant: <variant>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized variant: <variant> for code: <code>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|unrecognized variant: <variant> for code-script pair: <code>-<script>}}
| {{tld|Lang}} ||rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|invalid parameter}}
| {{tld|Lang}} || rowspan="2" | parameter named in the error message is not supported by the template | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|no text}}
| {{tld|Lang}} || | |
{{tld|Langx}} | is empty; this parameter is required. This error can occur if there is an equals sign (=) in the foreign-language text; use {{tl|1==}} if an equals sign is needed. |
scope="row" rowspan="2" | {{error|tag=span|text has italic markup}}
| {{tld|Lang}} ||rowspan="2"| | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|text has malformed markup}}
| {{tld|Lang}} ||rowspan="2"| | |
{{tld|Langx}} | |
scope="row" | {{error|tag=span|redundant script tag}}
| {{tld|Langx}} || both the script subtag in {{para|code}} in the template's module | |
scope="row" | {{error|tag=span|redundant region tag}}
| {{tld|Langx}} || both the region subtag in {{para|code}} in the template's module | |
scope="row" | {{error|tag=span|redundant variant tag}}
| {{tld|Langx}} || both the variant subtag in {{para|code}} in the template's module | |
scope="row" | {{error|tag=span|code / script mismatch: <code> / <script>}}
| {{tld|Langx}} || where | |
scope="row" | {{error|tag=span|conflicting: |rowspan="2"| {{tld|Langx}} ||rowspan="2"| this error occurs when positional and named parameters are used together | |
scope="row" | {{error|tag=span|conflicting: | |
scope="row" | {{error|tag=span|conflicting: {{pipe}}lit{{=}} and {{pipe}}translation{{=}}}}
|rowspan="2"| {{tld|Langx}} ||rowspan="2"| only one of these aliases is permitted | |
scope="row" | {{error|tag=span|conflicting: {{pipe}}links{{=}} and {{pipe}}link{{=}}}} | |
scope="row" rowspan="2" | {{error|tag=span|script: <script> not supported for code: <code>}}
| {{tld|Lang}} || rowspan="2"| where | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|Non-latn text/Latn script subtag mismatch}}
| {{tld|Lang}} || rowspan="2"| when the script subtag is | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|Latn text/non-Latn script subtag mismatch}}
| {{tld|Lang}} || rowspan="2"| when the value of | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|transliteration of latn script}}
| {{tld|Langx}} || | |
{{tld|Langx}} | |
scope="row" rowspan="2" | {{error|tag=span|transliteration text not Latin script}}
| {{tld|Langx}} || |
Italic markup errors
The {{error|tag=span|text has italic markup}} error commonly occurs for these reasons:
text
includes text written with more than one alphabet- :in this example, Ancient Greek with a Latin script transliteration (also called Romanization)
- ::
{{Langx|grc|Ἀθῆναι, Athênai}} - :the above should be rewritten
- ::
→ {{Langx|grc|Ἀθῆναι|translit=Athênai}}{{Langx|grc|Ἀθῆναι|translit=Athênai}} - :A similar condition may exist for languages that have multiple writing systems, where the second is not a transliteration of the first but the actual text as written in the 'other' writing system. For such templates, consider writing:
- ::
{{Lang-xx|<first text>|italic=<yes|no>|rtl=<yes|no>}} {{Lang|xx|<second text>}} text
includes italic markup to override default italic markup set by the {{tld|Lang-xx}} template (see the settings box in the template doc §Usage section)- ::
– 'Dumbairton' is a proper name so should not be italicized{{Langx|sco|Dumbairton}} - ::the above should be rewritten
- :::
→ {{Langx|sco|Dumbairton|italic=no}}{{Langx|sco|Dumbairton|italic=no}} - :for languages like Kurdish that use more than one script and where the template default is to italicize
- ::
–{{Lang-ku|ههڵپهركێ}} text
holds a script that should not be italicized - ::the above should be rewritten:
- :::
→ {{Langx|ku|ههڵپهركێ|italic=no|rtl=yes}}{{Langx|ku|ههڵپهركێ|italic=no|rtl=yes}} - ::::(it is prudent to set {{para|rtl}} to
yes
orno
so that the template includes the correct html markup in the rendering) - :when
text
holds Latin transliterations of right-to-left languages like Arabic (no Arabic script), add "-latn" to the language subtag so that the template removes the default right-to-left html markup from the rendering and automatically renders in italics: - ::
{{Langx|ar|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}} - ::the above could be rewritten:
- :::
→ {{Langx|ar-latn|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}}{{Langx|ar-latn|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}} - ::but, consider using the perhaps more semantically correct {{tlx|transliteration}} instead:
- :::
→ Arabic: {{Transliteration|ar|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}}Arabic: {{Transliteration|ar|min sallaf es-sabt lāqā el-ḥadd qiddāmūh}} text
includes italic wiki markup to 'turn off' italics for an inserted English-language conjunction between two non-English words or phrases:- :in this example, an English-language conjunction, 'or', is inserted between two Lithuanian phrases; English is not Lithuanian so does not belong inside of the {{tlx|Langx|lt}} template:
- ::
{{Langx|lt|Rusijos lietuvių seimas Petrograde or Visos Rusijos lietuvių seimas}} - :the above should be rewritten:
- ::
→ {{Langx|lt|Rusijos lietuvių seimas Petrograde}} or {{Lang|lt|Visos Rusijos lietuvių seimas}}{{Langx|lt|Rusijos lietuvių seimas Petrograde}} or {{Lang|lt|Visos Rusijos lietuvių seimas}} - When the template is {{tlx|Langx|en}} or {{tlx|Lang|en}}, consider removing the template; this is the English Wikipedia, it is not usually necessary to identify English text in the English Wikipedia as being English.
- Sometimes the inclusion of italic markup is just wrong.
- :For example, Cyrillic script is generally not to be rendered in italic font; see .
- ::
{{Langx|uk|Українська Народна Міліція}} - :the above should be rewritten:
- ::
→ {{Langx|uk|Українська Народна Міліція}}{{Langx|uk|Українська Народна Міліція}}
See also
- {{Category link with count|ISO 639 name template errors}}
- {{Category link with count|Transliteration template errors}}
- MOS:FOREIGNITALIC
{{Automatic category TOC}}