Definition from Wiktionary, the free dictionary
Jump to: navigation, search

This module contains definitions and metadata for three-letter language codes starting with "q". See Wiktionary:Languages for more information.

This module must not be used directly in other modules or templates. The data should be accessed through Module:languages.

Required values

Every entry in the table must contain the following properties:

The "canonical" name of the language. This is the name that is used in Wiktionary entries and category names.

Optional values

The following properties are used for text substitution; they replace or remove certain (sets of) characters or sets of characters. They all work similar, and are all optional. The search and replacement patterns are those used by the standard mw.ustring.gsub function. They are regular expressions; see the Scribunto reference manual for more information.

If present, each of these properties must be a table that contains two tables, one named from and one named to. These two tables are organised pairwise: each element in from is a pattern to identify which characters in the term to replace, while the corresponding element in to defines what to replace them with. If the replacement is not present or if it is false or nil, it defaults to an empty replacement, meaning that the matching characters are removed altogether. This means that the from list can be longer than the to list, and an empty replacement will be assumed for any elements in from that have no counterpart in to.

At the top of the module, there is a list of combining characters with names. These are provided for convenience and readability, as combining characters generally do not display property inside the module code (although they do not affect the actual operation of the module).

Defines replacements to create the entry name from the displayed form of a term. This can be used to remove certain diacritical marks according to the customs or standard practice of the language. For example, it is used to remove accent marks from Russian words, or macrons from Latin or Old English words, as these are not used in the normal written form of these languages. This is used by makeEntryName in Module:languages.
Defines replacements to create a category sort key from the page name. The purpose is to remove any characters that are ignored in sorting, and to replace similar characters with identical ones if the sorting rules for that language do not distinguish them. For example, in German, the characters "ä" and "a" are considered equivalent for sorting, and are both treated as "a". The page name is converted to lowercase before applying the replacements, so you should not add uppercase letters to the "from" lists. This is used by makeSortKey in Module:languages.

These are other optional values:

A table of all the names that this language is known by, other than the canonical name. The list should include not only synonyms for the language, but also names that refer to language varieties that are subsumed under the same grouping. For example, while "Flemish" is not synonymous with "Dutch", Flemish is considered a part of Dutch, so the name is listed there.
The type of language (which affects how it is handled on Wiktionary). Possible values are:
  • regular - This value is the default, so it doesn't need to be specified. It indicates that the 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 Reconstruction namespace and must be prefixed with * to indicate a reconstruction.
  • reconstructed - This language is not attested according to CFI, and therefore is allowed only in the Reconstruction 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.
A list of script codes, see Wiktionary:Scripts. These represent all the scripts (writing systems) that this language employs, which are used on the main category of the language.
Most templates and modules will use a default script when no script is specified for them, but the script codes are interpreted in two different ways:
  • Templates and modules that use detect_script in Module:utilities will try to detect the script (based on the characters in the text), using the list of scripts as a list of possible scripts to try to detect. If the script cannot be detected, the first listed script is used by default.
  • All other templates and modules will generally use the first script listed as the default script.
The code for the family that the language belongs to. See Wiktionary:Families.
The name of a module that is used to generate transliterations of terms, without the Module: prefix. This module must export a function named tr that is defined as follows:
tr(text, lang, sc)
The three parameters are the text to be transliterated, the language code, and the script code. The function can ignore the language and script codes, but they are provided for cases when a language has more than one script, or when a single function is used to transliterate multiple languages sharing the same script.
A table listing the language codes of the direct ancestors of this language. For example, for English one would list enm (Middle English) but not ang (Old English). For most languages, only one value should be specified in the list, but multiple ancestors can be listed for pidgins, creoles and mixed languages.
A table listing the Wikimedia language codes that this language maps to. This is used to translate Wiktionary codes to Wikimedia codes, which are usually the same but there are a few languages where it is different. The language codes must be valid Wikimedia codes (as determined by the wiki software), and if they are not defined in one of the language data modules, they must be defined in Module:wikimedia languages/data.
The name of the Wikipedia article for the language. Should be supplied if different from the name of the language's category on Wiktionary.

local u = mw.ustring.char

-- UTF-8 encoded strings for some commonly-used diacritics
local GRAVE     = u(0x0300)
local ACUTE     = u(0x0301)
local CIRC      = u(0x0302)
local TILDE     = u(0x0303)
local MACRON    = u(0x0304)
local BREVE     = u(0x0306)
local DOTABOVE  = u(0x0307)
local DIAER     = u(0x0308)
local CARON     = u(0x030C)
local DGRAVE    = u(0x030F)
local INVBREVE  = u(0x0311)
local DOTBELOW  = u(0x0323)
local RINGBELOW = u(0x0325)
local CEDILLA   = u(0x0327)

local m = {}

m["qua"] = {
	canonicalName = "Quapaw",
	otherNames = {"Arkansas"},
	scripts = {"Latn"},
	family = "sio",

m["quc"] = {
	canonicalName = "K'iche'",
	scripts = {"Latn"},
	family = "myn",

m["qui"] = {
	canonicalName = "Quileute",
	scripts = {"Latn"},
	family = "chi",

m["qum"] = {
	canonicalName = "Sipacapense",
	scripts = {"Latn"},
	family = "myn",

m["qun"] = {
	canonicalName = "Quinault",
	scripts = {"Latn"},
	family = "sal",

m["quq"] = { -- should this continue to be considered separate language?
	canonicalName = "Quinqui",
	scripts = {"Latn"},

m["quv"] = {
	canonicalName = "Sacapulteco",
	scripts = {"Latn"},
	family = "myn",

m["qvy"] = {
	canonicalName = "Queyu",
	family = "sit-qia",

m["qwc"] = {
	canonicalName = "Classical Quechua",
	scripts = {"Latn"},
	family = "qwe",

m["qwm"] = {
	canonicalName = "Kipchak",
	otherNames = {"Kypchak", "Qypchaq", "Armeno-Kipchak", "Armeno-Qypchaq", "Mamluk-Kipchak", "Cuman", "Kuman", "Polovets"},
	scripts = {"Latn", "Armn", "Arab"},
	family = "trk-kip",
	translit_module = "qwm-translit",

m["qwt"] = {
	canonicalName = "Kwalhioqua-Tlatskanai",
	scripts = {"Latn"},
	family = "ath",

m["qxs"] = {
	canonicalName = "Southern Qiang",
	scripts = {"Latn"},
	family = "tbq",

m["qya"] = {
	canonicalName = "Quenya",
	type = "appendix-constructed",
	scripts = {"Latn", "Teng"},
	family = "art",

m["qyp"] = {
	canonicalName = "Quiripi",
	otherNames = {"Unquachog", "Unkechaug", "Quiripi-Unquachog", "Naugatuck", "Wampano", "Quinnipiac"},
	scripts = {"Latn"},
	family = "alg",

return m