Module:languages/canonical names/doc

Revision as of 12:58, 21 April 2026 by Sware (talk | contribs) (Created page with "This module exports a table that converts the canonical name of a language to the corresponding code: <syntaxhighlight lang="lua"> local lang_name = mw.loadData("Module:languages/canonical names")["English"] --> "en" </syntaxhighlight> It covers languages in the data submodules of Module:languages, not etymology languages (Module:etymology languages/data), language families (Module:families), or scripts (Module:scripts/data). {{if then show|{{#invoke:da...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:languages/canonical names

This module exports a table that converts the canonical name of a language to the corresponding code:

local lang_name = mw.loadData("Module:languages/canonical names")["English"] --> "en"

It covers languages in the data submodules of Module:languages, not etymology languages (Module:etymology languages/data), language families (Module:families), or scripts (Module:scripts/data).

The following errors were detected by Module:data consistency check: Lua error in Module:data_consistency_check at line 445: attempt to index local 'fam' (a nil value).

If JavaScript is enabled, you can update the module by pressing the button at the top of the documentation page.

See also Module:languages/code to canonical name.