Module:Switch

--Replaces the inneficient parser function --Syntax - where option is any string to match --and caseX any key-value pairs --Syntax2  -> bcd local p = {}

function p.main(frame) local tArgLang = frame.args return p.switch(tArgLang) end

function p.switch(tArgs) if tArgs and tArgs[1] then local sCase = tArgs[1] if tonumber(sCase) then sCase = tonumber(sCase)+1 end return mw.getCurrentFrame:preprocess(tArgs[sCase] or "") end end

return p