Module:languages/canonical names/doc: Difference between revisions

From Linguifex
Jump to navigation Jump to search
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..."
 
No edit summary
 
Line 5: Line 5:


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]]).
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:data consistency check|check_modules_t|languages/canonical names|languages/code to canonical name}}|This module is up-to-date and correct according to [[Module:data consistency check]].|The following errors were detected by [[Module:data consistency check]]:
<noinclude/>}}


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

Latest revision as of 15:39, 17 May 2026

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).

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.