Module:User:Ungoliant MMDCCLXIV

local export = {}

local m_languages = require("Module:languages") local m_links = require("Module:links") local m_qual = require("Module:qualifier")

function export.nyms(frame) local params = { [1] = {required = true, default = "und"}, [2] = {list = true, allow_holes = true, required = false}, ["alt"] = {list = true, allow_holes = true}, ["tr"] = {list = true, allow_holes = true}, ["q"] = {list = true, allow_holes = true} }	local args = require("Module:parameters").process(frame:getParent.args, params) local nym_type = frame.args[1] local lang = m_languages.getByCode(args[1]) or m_languages.err(args[1], 1) local maxindex = math.max(args[2].maxindex, args["alt"].maxindex, args["tr"].maxindex) if maxindex < 1 then return "" .. mw.getContentLanguage:ucfirst(nym_type) .. ": " .. " [please add!] " .. "" ..			" "	else for i = 1, maxindex do			args[2][i] = m_links.full_link{ lang = lang, term = args[2][i], alt = args["alt"][i], tr = args["tr"][i] } if args["q"][i] then args[2][i] = args[2][i] .. " " .. m_qual.format_qualifier({args["q"][i]}) end end return "" .. mw.getContentLanguage:ucfirst(nym_type) .. (maxindex > 1 and "s" or "") .. ": " .. table.concat(args[2], ", ") .. " "	end end

return export