ထာမ်ပလိက်:langname-lite/documentation

နူ ဝိက်ရှေန်နရဳ
စရၚ်လိက်စၟတ်သမ္တီသွက်ထာမ်ပလိက်:langname-lite[ပလေဝ်ဒါန်]
မုက်လိက်တဏအ် လုပ်အဝေါၚ်စရၚ်ကဏ္ဍပွမစေပ်စၞောန်ဟွံဂြက်ဂမၠိုၚ်လေန်အိန်တာဝဳကဳ ကဵု ပွမဓမံက်ထ္ၜးကဵုအဓိပ္ပာဲပရောပရာတၞဟ်နကဵုထာမ်ပလိက်။

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 ဗၠေတ်: not enough memory.

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 aliases ML, ML. and Medieval Latin:

|ML|ML.|Medieval Latin={{langname-lite/etymcode|<!-- -->Medieval Latin<!-- -->|<!-- -->Latin<!-- -->|{{{allow etym|}}}}}