ထႅမ်းပလဵတ်ႉ:langname-lite/documentation
Maps language codes to (canonical) language names. Used for Lua-free templates. Should be kept in sync with Module:languages, Module:etymology languages and Module:families, but not every language should be listed here; only those which are actually needed.
Default behaviour:
- If an etymology-only language code is given, it will return the canonical name of the regular language which it is attached to.
- If a language family code is given, it will give an error saying that this is not allowed.
See the parameters section below for changing these.
Errors
[မႄးထတ်း]The following errors were detected by Module:data consistency check: Lua error in မေႃႇၵျူး:data_consistency_check at line 373: attempt to call method 'getAncestors' (a nil value).
Parameters
[မႄးထတ်း]|1=
- Language code.
|allow etym=
- If this is set, the template will return the canonical names of etymology-only languages.
|allow family=
- If this is set, the template will return the canonical names of language families.
|is family=
- If this is set, the template will return
1
if the code is for a language family; otherwise, it will behave normally. This is useful when used with the#ifeq
parser function.
Editing the list
[မႄးထတ်း]The list has been subdivided into switch tables based on the first letter; this is to prevent very large pages from hitting the preprocessor node count limit. Please note that this is case-sensitive, meaning (for example) that there are separate lists for codes beginning with e
and E
, which becomes relevant when adding alias codes for etymology-only languages.
|la=Latin
Etymology-only languages and language families may be listed, but have additional syntax. For example:
- Etymology-only language:
|la-med={{langname-lite/etymcode|<!-- -->Medieval Latin<!-- -->|<!-- -->Latin<!-- -->|{{{allow etym|}}}}}
- The first name is that of the etymology-only language, and the second that of the regular language which it is attached to (usually the parent in Module:etymology languages/data, unless that is another etymology-only language, in which just follow the chain until you find a regular language).
- Language family:
|sla={{langname-lite/familycode|<!-- -->Slavic<!-- -->|{{{is family|}}}|{{{allow family|}}}}}
If you are adding aliases (alternative codes) for a language, you must duplicate the entry in the relevant list if it begins with a different letter to the main code, or else it won't work. For example, Medieval Latin has the main code la-med
, entered under the l
list (as per the example above), as well as the following entry under M
for its alias ML.
:
|ML.={{langname-lite/etymcode|<!-- -->Medieval Latin<!-- -->|<!-- -->Latin<!-- -->|{{{allow etym|}}}}}