Module:languages/documentation Jul 5th 2013, 23:52, by CodeCat | | (One intermediate revision by one user not shown) | Line 11: | Line 11: | | Every entry in the table must contain the following properties: | | 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. | | ; 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". | + | ; type: The type of language (which affects how it is handled on Wiktionary). Possible values are: | | + | ;* "regular" - This language is attested according to [[WT:CFI]] and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the Appendix namespace and must be prefixed with * to indicate a reconstruction. Most languages should use this. | | + | ;* "reconstructed" - This language is not attested according to CFI, and therefore is allowed only in the Appendix namespace. All terms in this language are reconstructed, and must be prefixed with *. | | + | ;* "appendix-constructed" - This language is attested but does not meet the additional requirements set out for constructed languages ([[WT:CFI#Constructed languages]]). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links. | | ; 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". | | ; 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". | | ; family: The code for the family that the language belongs to. See [[Module:families]]. If you do not know the family, use "qfa-und". |
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. To access this data from templates, use Module:language utilities. 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" - This language is attested according to WT:CFI and therefore permitted in the main namespace. There may also be reconstructed terms for the language, which are placed in the Appendix namespace and must be prefixed with * to indicate a reconstruction. Most languages should use this.
- "reconstructed" - This language is not attested according to CFI, and therefore is allowed only in the Appendix namespace. All terms in this language are reconstructed, and must be prefixed with *.
- "appendix-constructed" - This language is attested but does not meet the additional requirements set out for constructed languages (WT:CFI#Constructed languages). Its entries must therefore be in the Appendix namespace, but they are not reconstructed and therefore should not have * prefixed in links.
- 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".
|