Module:languages/names/generate: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 4: Line 4:
local languages = require("Module:languages").languages
local languages = require("Module:languages").languages
local ret = "return {"
local ret = "return {"
ret = ret .. '["num"] = ' .. #languages .. ","
ret = ret .. '["test"] = ' .. languages .. ","
for k, v in ipairs(languages) do
for k, v in ipairs(languages) do
ret = ret .. '\n\t["' .. v.name .. '"] = "' .. v.code .. '",'
ret = ret .. '\n\t["' .. v.name .. '"] = "' .. v.code .. '",'