Module:languages/doc

ពីWiktionary

This is the documentation page for Module:languages

This module contains definitions and metadata for all language codes on Wiktionary. The entries are listed by their language code, which is usually an ISO-639 code, but there are also some exceptional codes. These are listed on Wiktionary:Languages.

This module must not be imported using require. Instead, it is imported like this:

local languages = mw.loadData("Module:languages")

This ensures that the data is only loaded once per page, rather than once for every module invocation like normal.

Every entry in the table must contain the following properties:

names
A list of all the names that this language is known by. The first name listed is always the "canonical" name, which is used in Wiktionary entries.
type
The type of language (which affects how it is handled on Wiktionary). Possible values are: "regular", "reconstructed", "appendix-constructed". Most languages should use "regular".
scripts
A list of script codes, representing all the scripts (writing systems) that this language employs, which are used on the main category of the language. The first script listed is always the "default" script, which is to be used when no other script is specified. If you do not know the script, use "None".
family
The code for the family that the language belongs to. See Module:families. If you do not know the family, use "qfa-und".