Module:Langlist

--[=[ Module description ]=]

local p = {} --p stands for package

local getArgs = require('Module:Arguments').getArgs

function lang_link(base, code) return "" .. mw.language.fetchLanguageName(code) .. "" end

function p.langlist(frame) local args = getArgs(frame) local base = args.base local links = {} for k, v in pairs(args) do		if tonumber(k) then table.insert(links, lang_link(base, v)) end end local editlink if args.noedit then editlink = "…" else editlink = "[" .. tostring(mw.uri.fullUrl("Template:" .. base .. "/lang", "action=edit")) .. " +/-]"	end local title = mw.title.getCurrentTitle local template_cat = "" if title.nsText == "Template" and title.subpageText == "lang" then template_cat = "" end local sep = " &#124; " return " " .. table.concat(links, sep) .. sep .. editlink .. " " .. template_cat end

return p