Module:Country handler
More actions
This documentation is transcluded from Module:Country handler/doc. Changes can be proposed in the talk page.
local p = {}
local getArgs = require('Module:Arguments').getArgs
function p.country(country)
mw.logObject(country)
if country == nil or country == '' then return nil
elseif country == 'USA' then return 'the United States'
elseif country == 'United States of America' then return 'the United States of America'
elseif country == 'UAE' then return 'the United Arab Emirates'
elseif country == 'UK' or country == 'United Kingdom' then return 'the United Kingdom'
elseif country == 'Netherlands' or country == 'Philippines' or country == 'Czech Republic' or country == 'Dominican Republic' or country == 'Bahamas' then return string.format('the %s', country)
else return country
end
end
function p.main(frame)
local args = getArgs(frame)
local country = args.country
return p.country(country)
end
return p