Module:Flag
From Inkipedia, the Splatoon wiki
{{flag|<2 letter abbreviation>|<size>}}
Size is 20x20 by default. px
is not necessary.
Current regions supported
Type the ISO 3166-1 code in lower-case for use in template.
Region name | ISO 3166-1 code | Output |
---|---|---|
Argentina | AR | |
Australia | AU | |
Austria | AT | |
Belgium | BE | |
Brazil | BR | |
Canada | CA | |
Canada and France | CAFR[1] | |
China | CN | |
Cuba | CU | |
Czech Republic | CZ | |
Denmark | DK | |
Europe | EU | |
Finland | FI | |
France | FR | |
Germany | DE | |
Greece | GR | |
Hong Kong | HK | |
Hungary | HU | |
India | IN | |
Indonesia | ID | |
Ireland | IE | |
Israel | IL | |
Italy | IT | |
Japan | JP | |
Malaysia | MY | |
Mexico | MX | |
Netherlands | NL | |
North Korea | KP | |
Norway | NO | |
Panama | PA | |
Philippines | PH | |
Poland | PL | |
Portugal | PT | |
Quebec | QC[a] | |
Romania | RO | |
Russia | RU | |
South Korea | KR | |
Spain | ES | |
Spain and Mexico | ESMX[1] | |
Sweden | SE | |
Singapore | SG | |
Taiwan | TW | |
Thailand | TH | |
Ukraine | UA | |
United Arab Emirates | AE | |
United Kingdom | GB | |
United States | US | |
United Kingdom and United States | USGB[1] |
Uploading .svg files of country flags and adding them here is allowed. Optionally, you can ask a staff member or user to upload and add a flag.
Notes
- ↑ Quebec does not have an ISO 3166-1 code; its Canadian postal abbreviation has been used instead.
local p = {} local flag_map = { ["ae"] = "UAE", ["ar"] = "Argentina", ["au"] = "Australia", ["at"] = "Austria", ["be"] = "Belgium", ["br"] = "Brazil", ["ca"] = "Canada", ["cafr"] = "CanadaFrance", ["ch"] = "Switzerland", ["cn"] = "China", ["cu"] = "Cuba", ["cz"] = "CzechRepublic", ["dk"] = "Denmark", ["de"] = "Germany", ["gr"] = "Greece", ["es"] = "Spain", ["eu"] = "EU", ["esmx"] = "SpainMexico", ["fi"] = "Finland", ["fr"] = "France", ["hk"] = "Hong Kong", ["hu"] = "Hungary", ["id"] = "Indonesia", ["ie"] = "Ireland", ["il"] = "Israel", ["in"] = "India", ["it"] = "Italy", ["jp"] = "Japan", ["kp"] = "North Korea", ["mx"] = "Mexico", ["my"] = "Malaysia", ["nl"] = "Netherlands", ["no"] = "Norway", ["pa"] = "Panama", ["ph"] = "Philippines", ["pl"] = "Poland", ["pt"] = "Portugal", ["qc"] = "Quebec", ["ro"] = "Romania", ["ru"] = "Russia", ["se"] = "Sweden", ["sg"] = "Singapore", ["kr"] = "South Korea", ["tw"] = "Taiwan", ["th"] = "Thailand", ["ua"] = "Ukraine", ["uk"] = "UK", ["gb"] = "UK", ["us"] = "USA", ["usgb"] = "USAUK" } function p.main(frame) local args = frame:getParent().args local countryCode = args[1] or "" local size = args["size"] or args[2] or "20x20" return p.getFlag(countryCode, size) end function p.getFlag(countryCode, size) local flagName = flag_map[countryCode] or "" return string.format('[[File:Flag%s.svg|border|%spx|link=|%s]]', flagName, size, (flagName ~= "" and flagName or "Undisclosed")) end return p