Module:Multilingual description
From Neodyland Wiki
More actions
This documentation is transcluded from Module:Multilingual description/doc.
local p = {}
function p.mld(frame)
local args, pargs = frame.args, ( frame:getParent() or {} ).args or {}
local sorting = require('Module:Multilingual description/sort')
local processed = {}
local ret = {}
for k, v in pairs( sorting ) do
if pargs[v] then
table.insert(ret, '{{ls|' .. v .. '|' .. pargs[v] .. '|classes=description}}')
end
processed[v] = 1
end
for k, v in pairs( pargs ) do
if not processed[k] and mw.language.isSupportedLanguage(k) then
table.insert(ret, '{{ls|' .. k .. '|' .. v .. '|classes=description}}')
end
end
return frame:preprocess(table.concat(ret))
end
return p