Module:languages/documentation

This module is used to retrieve and manage the languages that can have Wiktionary entries, and the information associated with them. See Languages for more information.

For the languages and language varieties that may be used in etymologies, see Module:etymology languages. For language families, which sometimes also appear in etymologies, see Module:families.

This module provides access to other modules. To access the information from within a template, see Module:languages/templates.

The information itself is stored in the various data modules that are subpages of this module. These modules should not be used directly by any other module, the data should only be accessed through the functions provided by this module.

Data submodules:
 * Two-letter codes
 * Three-letter codes by their first letter:
 * Longer codes containing hyphens

Extra data submodules (for less frequently used data):
 * Two-letter codes
 * Three-letter codes by their first letter:
 * Longer codes containing hyphens

Finding and retrieving languages
The module exports a number of functions that are used to find languages.

Language objects
A  object is returned from one of the functions above. It is a Lua representation of a language and the data associated with it. It has a number of methods that can be called on it, using the  syntax. For example:

Error function
See Module:languages/error.