Module:Flag

local p = {} local data = mw.loadData('Module:Flag/data') local getArgs = require('Module:Arguments').getArgs local yesno = require('Module:Yesno')

function p.main(frame) local args = getArgs(frame, {   wrappers = {      'Template:Flag'    }  }) return p._main(args) end

function p._main(args) if args[1] then local country = data[string.lower(args[1])] or args[1] or 'World' local size = args[2] or '25px' if yesno(args.name) then return string.format(' %s', country, size, country, country) else return string.format('', country, size, country) end else return '' end end

return p