"Modi": "Modi", "Mong": "Mongolian", "Moon": "Moon", "Morse": "Morse <span class="searchmatch">code</span>", "Mroo": "Mru", "Mtei": "Meitei Mayek", "Mult": "Multani", "Music":...
"Module:<span class="searchmatch">scripts</span>/<span class="searchmatch">canonical</span> <span class="searchmatch">names</span>" local <span class="searchmatch">scripts</span>_chartoscript_module = "Module:<span class="searchmatch">scripts</span>/charTo<span class="searchmatch">Script</span>" local <span class="searchmatch">scripts</span>_data_module = "Module:<span class="searchmatch">scripts</span>/data" local...
m_scripts = require("Module:<span class="searchmatch">scripts</span>") local sc = m_<span class="searchmatch">scripts</span>.getBy<span class="searchmatch">Code</span>("Latn") local <span class="searchmatch">name</span> = sc:get<span class="searchmatch">Canonical</span><span class="searchmatch">Name</span>() -- "<span class="searchmatch">name</span>" will now be "Latin" (The generated...
AllCodeToCanonical() local <span class="searchmatch">code</span>To<span class="searchmatch">Name</span> = require("Module:languages/<span class="searchmatch">code</span> <span class="searchmatch">to</span> <span class="searchmatch">canonical</span> <span class="searchmatch">name</span>") return require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span>(<span class="searchmatch">code</span>To<span class="searchmatch">Name</span>) end function export...
access <span class="searchmatch">to</span> Module:<span class="searchmatch">scripts</span> from templates, so that they can make use of the information stored there. {{#invoke:<span class="searchmatch">scripts</span>/templates|exists|<span class="searchmatch">script</span> <span class="searchmatch">code</span>}} Check...
export the <span class="searchmatch">canonical</span> <span class="searchmatch">names</span> and <span class="searchmatch">script</span> <span class="searchmatch">codes</span> for languages with two-letter <span class="searchmatch">codes</span>. The following arguments list data keys which will be exported. <span class="searchmatch">To</span> conserve...
local m_<span class="searchmatch">scripts</span> = require("Module:<span class="searchmatch">scripts</span>") local m_<span class="searchmatch">scripts</span>_<span class="searchmatch">canonical</span>_<span class="searchmatch">names</span> = require("Module:<span class="searchmatch">scripts</span>/<span class="searchmatch">canonical</span> <span class="searchmatch">names</span>") local m_<span class="searchmatch">scripts</span>_<span class="searchmatch">codes</span> =...
"en") and you want <span class="searchmatch">to</span> find out its <span class="searchmatch">canonical</span> <span class="searchmatch">name</span>, you can use this: {{#invoke:languages/templates|getBy<span class="searchmatch">Code</span>|en|get<span class="searchmatch">Canonical</span><span class="searchmatch">Name</span>}} (returns "English")...
load_json_language_data(<span class="searchmatch">json</span>) local data = mw.text.<span class="searchmatch">json</span>Decode(<span class="searchmatch">json</span>) local fixed_data = {} for <span class="searchmatch">code</span>, old_table in pairs(data) do -- Key 1 (<span class="searchmatch">canonical</span> <span class="searchmatch">name</span>) is always...
families_by_<span class="searchmatch">name</span>_module = "Module:families/<span class="searchmatch">canonical</span> <span class="searchmatch">names</span>" local families_data_module = "Module:families/data" local <span class="searchmatch">json</span>_module = "Module:<span class="searchmatch">JSON</span>" local language_like_module...