Module:Flag
De Inkipédia
Documentation
Paramètres
Régions actuellement supportése
Nom de la région | Code ISO 3166-1 | Entrée | Sortie |
---|---|---|---|
Argentina | AR | {{flag|code = ar}} | |
Australia | AU | {{flag|code = au}} | |
Austria | AT | {{flag|code = at}} | |
Belgium | BE | {{flag|code = be}} | |
Brazil | BR | {{flag|code = br}} | |
Canada | CA | {{flag|code = ca}} | |
Canada and France | CAFR[notes 1] | {{flag|code = cafr}} | |
China | CN | {{flag|code = cn}} | |
Cuba | CU | {{flag|code = cu}} | |
Czech Republic | CZ | {{flag|code = cz}} | |
Denmark | DA | {{flag|code = da}} | |
Europe | EU | {{flag|code = eu}} | |
Finland | FI | {{flag|code = fi}} | |
France | FR | {{flag|code = fr}} | |
Germany | DE | {{flag|code = de}} | |
Greece | GR | {{flag|code = gr}} | |
Hong Kong | HK | {{flag|code = hk}} | |
Hungary | HU | {{flag|code = hu}} | |
India | IN | {{flag|code = in}} | |
Indonesia | ID | {{flag|code = id}} | |
Ireland | IE | {{flag|code = ie}} | |
Israel | IL | {{flag|code = il}} | |
Italy | IT | {{flag|code = it}} | |
Japan | JP | {{flag|code = jp}} | |
Malaysia | MY | {{flag|code = my}} | |
Mexico | MX | {{flag|code = mx}} | |
Netherlands | NL | {{flag|code = nl}} | |
North Korea | KP | {{flag|code = kp}} | |
Norway | NO | {{flag|code = no}} | |
Philippines | PH | {{flag|code = ph}} | |
Poland | PL | {{flag|code = pl}} | |
Portugal | PT | {{flag|code = pt}} | |
Quebec | QC[notes 2] | {{flag|code = qc}} | |
Romania | RO | {{flag|code = ro}} | |
Russia | RU | {{flag|code = ru}} | |
South Korea | KR | {{flag|code = kr}} | |
Spain | ES | {{flag|code = es}} | |
Spain and Mexico | ESMX | {{flag|code = esmx}} | |
Sweden | SE | {{flag|code = se}} | |
Singapore | SG | {{flag|code = sg}} | |
Taiwan | TW | {{flag|code = tw}} | |
Thailand | TH | {{flag|code = th}} | |
Ukraine | UA | {{flag|code = ua}} | |
United Arab Emirates | AE | {{flag|code = ae}} | |
United Kingdom | UK | {{flag|code = uk}} | |
United States | US | {{flag|code = us}} |
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
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", ["da"] = "Denmark", ["de"] = "Germany", ["gr"] = "Greece", ["es"] = "Spain", ["eu"] = "Europe", ["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", ["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"] = "United Kingdom", ["us"] = "USA" } function p.main(frame) local args = frame:getParent().args local countryCode = args["code"] or args[1] local size = args["taille"] 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=]]', flagName, size, (flagName ~= "" and flagName or "Undisclosed")) end return p