Module:Country extract
Appearance
![]() | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
![]() | This Lua module is used on 413,000+ pages, or roughly 46% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
local p = {}
--[[
to enable us to replicate the current functioning of CountryAbbr and CountryAbbr2
We need to deal with
1 alternative names ISO 3166 should do that
]]
function p.extractCountry(frame)
local rv= mw.ustring.toNFC (frame.args[1])
rv = mw.ustring.gsub(rv,"{{","")
return rv
end
--[[
]]
function p.helper(frame)
local rv= mw.ustring.toNFC (frame.args[1])
return rv
end
return p