Jump to content

Module:Interwiki map

From Patch demo (1041816,1)
Revision as of 23:16, 12 June 2024 by Patch Demo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Interwiki map/doc

local p = {}

function p.main( frame )
    local decoded = mw.text.jsonDecode(frame.args[1])
    local output = ''
    for k, v in ipairs(decoded) do
    	output = output .. '| ' .. v['prefix'] .. ' || ' .. v['url'] .. '\n|-\n'
    end
    
    return output
end

return p