Module:languages/names/generate

From Laenkea
< Module:languages‎ | names
Revision as of 07:39, 6 August 2023 by Maria (talk | contribs)
Jump to navigation Jump to search

Generates up-to-date output that can be used to set the value of Module:languages/names.

Result

return {
	Riyan,
}

local export = {}
local languages = mw.loadData("Module:languages/data")

function export.show()
	local ret = "return {"
	ret = ret .. "\n\t" .. languages["ryn"].name .. ","
	for k, v in ipairs(languages) do
		ret = ret .. '\n\t["' .. v.name .. '"] = "' .. v.code .. '",'
	end
	ret = ret .. "\n}"
	return ret
end

return export