Module:Sandbox/BotAntony

local p = {}

local interwiki_data = mw.loadData("Module:Sandbox/BotAntony/data")

local lang_list = {"en", "es", "ru"}

function p.gendata(frame) local curr_lang = frame.args.lang local result = "" result = result .. 'info["' .. curr_lang .. '"] = {} ' if curr_lang ~= "en" then for i = 0, 20 do result = result .. end end return frame:preprocess(result) end

function p.addInterwiki(frame) local lang = frame.args.lang local page = frame.args.page local result = "" if lang ~= 'en' then result = result ..  .. page ..  end for _,v in ipairs(lang_list) do		if interwiki_data[v][page] and v ~= lang then result = result ..  .. v .. ':' .. interwiki_data[v][page] ..  end end return result end

return p