invocation.") local lang = require("Module:languages").getByCode(langcode) or error("<span class="searchmatch">Language</span> code not found") return lang:to<span class="searchmatch">JSON</span>() end return export...
Converts <span class="searchmatch">language</span> data to <span class="searchmatch">JSON</span>. The data can be fetched using an expand templates API call, e.g. [1]...
Available functions are: export_<span class="searchmatch">languages</span>, export_scripts and export_families, which generate the <span class="searchmatch">JSON</span> equivalents of Module:<span class="searchmatch">languages</span>, Module:scripts and Module:families...
GetAllData() local byName = require("Module:<span class="searchmatch">languages</span>/by name") return require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span>(byName) end function export.AllCanonicalToCode()...
require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span>(require("Module:families/data")) end function export.export_etymology_<span class="searchmatch">languages</span>(frame) return require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span>...
to convert them back. function export.load_<span class="searchmatch">json</span>_<span class="searchmatch">language</span>_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 code, old_table...
lower, find = string.lower, string.find end return require "Module:<span class="searchmatch">JSON</span>".to<span class="searchmatch">JSON</span>(Map:new(name_to_code) :filter(function (code, name) return find(lower(name)...
test() local m_<span class="searchmatch">languages</span> = require("Module:<span class="searchmatch">languages</span>") local lang = m_<span class="searchmatch">languages</span>.getByCode("grc") local <span class="searchmatch">json</span> = lang:to<span class="searchmatch">JSON</span>() return <span class="searchmatch">json</span> end return...
require("Module:parameters").process local remove = table.remove local to_<span class="searchmatch">json</span> = require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span> local ulen = mw.ustring.len local function get_data(frame...
local p = {} p.<span class="searchmatch">json</span> = require('Module:<span class="searchmatch">Json</span>') local to<span class="searchmatch">JSON</span> = require("Module:<span class="searchmatch">JSON</span>").to<span class="searchmatch">JSON</span> function p.echo(frame) return frame:getParent().args[1]...