Module:languages/names/generate: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
(Created page with "local export = {} function export.show() local languages = require("Module:languages").languages local ret = "return {" for k, v in ipairs(languages) do ret = ret + '\n\t["' .. v.name .. '"] = "' .. v.code .. '",' end ret = ret .. "\n}" return ret end return export")
 
No edit summary
Tag: Reverted
Line 1: Line 1:
local export = {}
local export = {}


function export.show()
function export.show(frame)
local wrap_b = (frame.args["wrap"] and ("<" .. frame.args["wrap"] .. ">")) or ""
local wrap_e = (frame.args["wrap"] and ("</" .. frame.args["wrap"] .. ">")) or ""
local languages = require("Module:languages").languages
local languages = require("Module:languages").languages
local ret = "return {"
local ret = "return {"
Line 8: Line 10:
end
end
ret = ret .. "\n}"
ret = ret .. "\n}"
return ret
return wrap_b .. ret .. wrap_e
end
end


return export
return export