Module:Families/data/doc

From The Languages of David J. Peterson
Jump to navigation Jump to search

This module contains definitions for all language family codes on Wiktionary. The entries are listed by their family code, which is usually an ISO-639 code, but there are also some exceptional codes. These are listed on Wiktionary:Families; that page also explains how to create new exceptional codes.

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

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

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

Errors

The following errors were detected by Module:data consistency check: Lua error in package.lua at line 80: module 'Module:languages/data/3/i/extra' not found.

Required values

Every entry in the table must contain the following properties:

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

Optional values

otherNames
A table of all the names that this family is known by, other than the canonical name. The list should include not only synonyms for the family, but also names that refer to families that are subsumed under the same grouping without being treated as a separate branch.
protoLanguage
The language code for the proto-language of the family; that is, the common ancestor of all languages in the family. If this is not specified, Module:families will attempt to create the proto-language code by adding -pro to the family code — for instance, ine (Indo-European languages) → ine-pro (Proto-Indo-European language) — and then use Module:languages to check if the code is valid.
family
The superfamily that the language family belongs to, if any.
wikidata_item
The Wikidata item id for the language family.