Difference between revisions of "Template:Flag"

From comp.tf
Jump to navigation Jump to search
(Reworked the entire flag template, uploaded flags for 231 countries)
m (fixed some bugs with flags)
Line 22: Line 22:
 
   |uken              = [[Image:En.gif| England|link=:Category:England]]
 
   |uken              = [[Image:En.gif| England|link=:Category:England]]
 
   |ukni              = [[Image:Ni.png| Northern Ireland|link=:Category:Northern Ireland]]
 
   |ukni              = [[Image:Ni.png| Northern Ireland|link=:Category:Northern Ireland]]
   |uksc              = [[Image:Sc.gif| Scotland|link=:Category:Scotland]]
+
   |uksc              = [[Image:Sc.png| Scotland|link=:Category:Scotland]]
 
   |ukwa              = [[Image:Wa.gif| Wales|link=:Category:Wales]]
 
   |ukwa              = [[Image:Wa.gif| Wales|link=:Category:Wales]]
 
   |uz                = [[Image:Uz.png| Uzbekistan|link=:Category:Uzbekistan]]
 
   |uz                = [[Image:Uz.png| Uzbekistan|link=:Category:Uzbekistan]]
Line 42: Line 42:
 
   |sweden            = [[Image:Se.png| Sweden|link=:Category:Sweden]]
 
   |sweden            = [[Image:Se.png| Sweden|link=:Category:Sweden]]
  
   |sc                = [[Image:Sc.gif| Scotland|link=:Category:Scotland]]
+
   |sc                = [[Image:Sc.png| Scotland|link=:Category:Scotland]]
 
   |sg                = [[Image:Sg.png| Singapore|link=:Category:Singapore]]
 
   |sg                = [[Image:Sg.png| Singapore|link=:Category:Singapore]]
 
   |si                = [[Image:Si.png| Slovenia|link=:Category:Slovenia]]
 
   |si                = [[Image:Si.png| Slovenia|link=:Category:Slovenia]]
Line 48: Line 48:
 
   |sv                = [[Image:Sv.png| El Salvador|link=:Category:El Salvador]]
 
   |sv                = [[Image:Sv.png| El Salvador|link=:Category:El Salvador]]
 
   |so                = [[Image:So.png| Somalia|link=:Category:Somalia]]
 
   |so                = [[Image:So.png| Somalia|link=:Category:Somalia]]
   |scotland          = [[Image:Sc.gif| Scotland|link=:Category:Scotland]]
+
   |scotland          = [[Image:Sc.png| Scotland|link=:Category:Scotland]]
 
   |serbia            = [[Image:Rs.png| Serbia|link=:Category:Serbia]]
 
   |serbia            = [[Image:Rs.png| Serbia|link=:Category:Serbia]]
 
       |saudiarabia
 
       |saudiarabia
Line 91: Line 91:
 
   |de                = [[Image:De.png| Germany|link=:Category:Germany]]
 
   |de                = [[Image:De.png| Germany|link=:Category:Germany]]
 
   |dk                = [[Image:Dk.png| Denmark|link=:Category:Denmark]]
 
   |dk                = [[Image:Dk.png| Denmark|link=:Category:Denmark]]
   |do                = [[Image:Do.gif| Dominican Republic|link=:Category:Dominican Republic]]
+
   |do                = [[Image:Do.png| Dominican Republic|link=:Category:Dominican Republic]]
 
   |deat              = [[Image:DeAt.png| GerSpeaking]]
 
   |deat              = [[Image:DeAt.png| GerSpeaking]]
 
   |denmark          = [[Image:Dk.png| Denmark|link=:Category:Denmark]]
 
   |denmark          = [[Image:Dk.png| Denmark|link=:Category:Denmark]]
   |dominican republic= [[Image:Do.gif| Dominican Republic|link=:Category:Dominican Republic]]
+
   |dominican republic= [[Image:Do.png| Dominican Republic|link=:Category:Dominican Republic]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
 
   }}
 
   }}
Line 147: Line 147:
 
   |estonia          = [[Image:Ee.png| Estonia|link=:Category:Estonia]]
 
   |estonia          = [[Image:Ee.png| Estonia|link=:Category:Estonia]]
 
   |ecuador          = [[Image:Ec.png| Ecuador|link=:Category:Ecuador]]
 
   |ecuador          = [[Image:Ec.png| Ecuador|link=:Category:Ecuador]]
   |eg                = [[Image:Eg.gif| Egypt|link=:Category:Egypt]]
+
   |eg                = [[Image:Eg.png| Egypt|link=:Category:Egypt]]
   |egypt            = [[Image:Eg.gif| Egypt|link=:Category:Egypt]]
+
   |egypt            = [[Image:Eg.png| Egypt|link=:Category:Egypt]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
 
   }}
 
   }}
Line 155: Line 155:
 
   |pa                = [[Image:Pa.png| Panama|link=:Category:Panama]]
 
   |pa                = [[Image:Pa.png| Panama|link=:Category:Panama]]
 
   |pk                = [[Image:Pk.png| Pakistan|link=:Category:Pakistan]]
 
   |pk                = [[Image:Pk.png| Pakistan|link=:Category:Pakistan]]
   |py                = [[Image:Py.gif| Paraguay|link=:Category:Paraguay]]
+
   |py                = [[Image:Py.png| Paraguay|link=:Category:Paraguay]]
 
   |pe                = [[Image:Pe.png| Peru|link=:Category:Peru]]
 
   |pe                = [[Image:Pe.png| Peru|link=:Category:Peru]]
 
   |ph                = [[Image:Ph.png| Philippines|link=:Category:Philippines]]
 
   |ph                = [[Image:Ph.png| Philippines|link=:Category:Philippines]]
Line 162: Line 162:
 
   |pakistan          = [[Image:Pk.png| Pakistan|link=:Category:Pakistan]]
 
   |pakistan          = [[Image:Pk.png| Pakistan|link=:Category:Pakistan]]
 
   |panama            = [[Image:Pa.png| Panama|link=:Category:Panama]]
 
   |panama            = [[Image:Pa.png| Panama|link=:Category:Panama]]
   |paraguay          = [[Image:Py.gif| Paraguay|link=:Category:Paraguay]]
+
   |paraguay          = [[Image:Py.png| Paraguay|link=:Category:Paraguay]]
 
   |peru              = [[Image:Pe.png| Peru|link=:Category:Peru]]
 
   |peru              = [[Image:Pe.png| Peru|link=:Category:Peru]]
 
   |philippines      = [[Image:Ph.png| Philippines|link=:Category:Philippines]]
 
   |philippines      = [[Image:Ph.png| Philippines|link=:Category:Philippines]]
Line 191: Line 191:
 
   |in                = [[Image:In.png| India|link=:Category:India]]
 
   |in                = [[Image:In.png| India|link=:Category:India]]
 
   |ir                = [[Image:Ir.png| Iran|link=:Category:Iran]]
 
   |ir                = [[Image:Ir.png| Iran|link=:Category:Iran]]
   |il                = [[Image:Il.gif| Israel|link=:Category:Israel]]
+
   |il                = [[Image:Il.png| Israel|link=:Category:Israel]]
 
   |is                = [[Image:Is.png| Iceland|link=:Category:Iceland]]
 
   |is                = [[Image:Is.png| Iceland|link=:Category:Iceland]]
 
   |italy            = [[Image:It.png| Italy|link=:Category:Italy]]
 
   |italy            = [[Image:It.png| Italy|link=:Category:Italy]]
 
   |iceland          = [[Image:Is.png| Iceland|link=:Category:Iceland]]
 
   |iceland          = [[Image:Is.png| Iceland|link=:Category:Iceland]]
 
   |indonesia        = [[Image:Id.png| Indonesia|link=:Category:Indonesia]]
 
   |indonesia        = [[Image:Id.png| Indonesia|link=:Category:Indonesia]]
   |israel            = [[Image:Il.gif| Israel|link=:Category:Israel]]
+
   |israel            = [[Image:Il.png| Israel|link=:Category:Israel]]
 
   |iran              = [[Image:Ir.png| Iran|link=:Category:Iran]]
 
   |iran              = [[Image:Ir.png| Iran|link=:Category:Iran]]
 
   |ireland          = [[Image:Ie.png| Ireland|link=:Category:Ireland]]
 
   |ireland          = [[Image:Ie.png| Ireland|link=:Category:Ireland]]
Line 206: Line 206:
 
   |bg                = [[Image:Bg.png| Bulgaria|link=:Category:Bulgaria]]
 
   |bg                = [[Image:Bg.png| Bulgaria|link=:Category:Bulgaria]]
 
   |bo                = [[Image:Bo.png| Bolivia|link=:Category:Bolivia]]
 
   |bo                = [[Image:Bo.png| Bolivia|link=:Category:Bolivia]]
   |ba                = [[Image:Ba.gif| Bosnia and Herzegovina|link=:Category:Bosnia and Herzegovina]]
+
   |ba                = [[Image:Ba.png| Bosnia and Herzegovina|link=:Category:Bosnia and Herzegovina]]
 
   |br                = [[Image:Br.png| Brazil|link=:Category:Brazil]]
 
   |br                = [[Image:Br.png| Brazil|link=:Category:Brazil]]
 
   |by                = [[Image:By.png| Belarus|link=:Category:Belarus]]
 
   |by                = [[Image:By.png| Belarus|link=:Category:Belarus]]
Line 212: Line 212:
 
   |belgium          = [[Image:Be.png| Belgium|link=:Category:Belgium]]
 
   |belgium          = [[Image:Be.png| Belgium|link=:Category:Belgium]]
 
   |bolivia          = [[Image:Bo.png| Bolivia|link=:Category:Bolivia]]
 
   |bolivia          = [[Image:Bo.png| Bolivia|link=:Category:Bolivia]]
   |bosnia            = [[Image:Ba.gif| Bosnia and Herzegovina|link=:Category:Bosnia and Herzegovina]]
+
   |bosnia            = [[Image:Ba.png| Bosnia and Herzegovina|link=:Category:Bosnia and Herzegovina]]
 
   |brazil            = [[Image:Br.png| Brazil|link=:Category:Brazil]]
 
   |brazil            = [[Image:Br.png| Brazil|link=:Category:Brazil]]
 
   |bulgaria          = [[Image:Bg.png| Bulgaria|link=:Category:Bulgaria]]
 
   |bulgaria          = [[Image:Bg.png| Bulgaria|link=:Category:Bulgaria]]
   |bd                = [[Image:Bd.gif| Bangladesh|link=:Category:Bangladesh]]
+
   |bd                = [[Image:Bd.png| Bangladesh|link=:Category:Bangladesh]]
   |bangladesh        = [[Image:Bd.gif| Bangladesh|link=:Category:Bangladesh]]
+
   |bangladesh        = [[Image:Bd.png| Bangladesh|link=:Category:Bangladesh]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Class]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Class]]
 
   }}
 
   }}
Line 224: Line 224:
 
   |mk                = [[Image:Mk.png| Macedonia|link=:Category:Macedonia]]
 
   |mk                = [[Image:Mk.png| Macedonia|link=:Category:Macedonia]]
 
   |my                = [[Image:My.png| Malaysia|link=:Category:Malaysia]]
 
   |my                = [[Image:My.png| Malaysia|link=:Category:Malaysia]]
   |md                = [[Image:Md.gif| Moldova|link=:Category:Moldova]]
+
   |md                = [[Image:Md.png| Moldova|link=:Category:Moldova]]
 
   |mo                = [[Image:Mo.png| Macau|link=:Category:Macau]]
 
   |mo                = [[Image:Mo.png| Macau|link=:Category:Macau]]
 
   |mt                = [[Image:Mt.png| Malta|link=:Category:Malta]]
 
   |mt                = [[Image:Mt.png| Malta|link=:Category:Malta]]
Line 234: Line 234:
 
   |mexico            = [[Image:Mx.png| Mexico|link=:Category:Mexico]]
 
   |mexico            = [[Image:Mx.png| Mexico|link=:Category:Mexico]]
 
   |morocco          = [[Image:Ma.png| Morocco|link=:Category:Morocco]]
 
   |morocco          = [[Image:Ma.png| Morocco|link=:Category:Morocco]]
   |moldova          = [[Image:Md.gif| Moldova|link=:Category:Moldova]]
+
   |moldova          = [[Image:Md.png| Moldova|link=:Category:Moldova]]
 
   |malta            = [[Image:Mt.png| Malta|link=:Category:Malta]]
 
   |malta            = [[Image:Mt.png| Malta|link=:Category:Malta]]
 
   |maldives          = [[Image:Mv.png| Maldives|link=:Category:Maldives]]
 
   |maldives          = [[Image:Mv.png| Maldives|link=:Category:Maldives]]
Line 280: Line 280:
 
   |tn                = [[Image:Tn.png| Tunisia|link=:Category:Tunisia]]
 
   |tn                = [[Image:Tn.png| Tunisia|link=:Category:Tunisia]]
 
   |tt                = [[Image:Tt.png| Trinidad And Tobago|link=:Category:Trinidad And Tobago]]
 
   |tt                = [[Image:Tt.png| Trinidad And Tobago|link=:Category:Trinidad And Tobago]]
   |tr                = [[Image:Tr.gif| Turkey|link=:Category:Turkey]]
+
   |tr                = [[Image:Tr.png| Turkey|link=:Category:Turkey]]
 
   |tw                = [[Image:Tw.png| Taiwan|link=:Category:Taiwan]]
 
   |tw                = [[Image:Tw.png| Taiwan|link=:Category:Taiwan]]
 
   |taiwan            = [[Image:Tw.png| Taiwan|link=:Category:Taiwan]]
 
   |taiwan            = [[Image:Tw.png| Taiwan|link=:Category:Taiwan]]
 
   |thailand          = [[Image:Th.png| Thailand|link=:Category:Thailand]]
 
   |thailand          = [[Image:Th.png| Thailand|link=:Category:Thailand]]
 
   |trinidadandtobago = [[Image:Tt.png| Trinidad And Tobago|link=:Category:Trinidad And Tobago]]
 
   |trinidadandtobago = [[Image:Tt.png| Trinidad And Tobago|link=:Category:Trinidad And Tobago]]
   |turkey            = [[Image:Tr.gif| Turkey|link=:Category:Turkey]]
+
   |turkey            = [[Image:Tr.png| Turkey|link=:Category:Turkey]]
 
   |tunisia          = [[Image:Tn.png| Tunisia|link=:Category:Tunisia]]
 
   |tunisia          = [[Image:Tn.png| Tunisia|link=:Category:Tunisia]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
 
   |#default          = [[Image:placeholderflag.png]] [[Category:Unrecognised Flag]]
Line 442: Line 442:
 
|}
 
|}
  
If the flag name is spelled incorrectly the page gets added to [[:Category:Unrecognised Flag]] and a transparent filler flag is used to keep alignment consistent. The invisible flag can optionally be added intentionally by writing "filler flag" or "ff".
+
If the flag name is spelled incorrectly the page gets added to [[:Category:Unrecognised Flag]] and a placeholder flag {{flag|ff}} is used to keep alignment consistent. This flag can optionally be added intentionally by writing "filler flag" or "ff".
  
 
[[Category:Template]]</noinclude>
 
[[Category:Template]]</noinclude>

Revision as of 15:38, 28 January 2014


Template for flag icons.

Usage

Just copy the code below to the page you want.

Example

{{flag|uk}}

Will Yeld

United Kingdom

You can also use the full names, e.g.:

{{flag|united kingdom}} = United Kingdom
{{flag|australia}} = Australia

Country Variables (Usable Abbreviations)

In addition to writing out the full name of each country, you can also use [http:||en.wikipedia.org|wiki|ISO_3166-1#Current_codes two-letter country codes] and in some cases other common abbreviations.

  • Argentina Argentina (ar)
  • Armenia Armenia (am)
  • Australia Australia (au)
  • Austria Austria (at)
  • Azerbaijan Azerbaijan (az)
  • Bangladesh Bangladesh (bd)
  • Belarus Belarus (by)
  • Belgium Belgium (be)
  • Bolivia Bolivia (bo)
  • Bosnia and Herzegovina Bosnia and Herzegovina (ba)
  • Brazil Brazil (br)
  • Bulgaria Bulgaria (bg)
  • Canada Canada (ca)
  • Chile Chile (cl)
  • China China (cn)
  • Colombia Colombia (co)
  • Costa Rica Costa Rica (cr)
  • Croatia Croatia (hr)
  • Czech Republic Czech Republic (cz)
  • Denmark Denmark (dk)
  • Dominican Republic Dominican Republic (do)
  • Egypt Egypt (eg)
  • El Salvador El Salvador (sv)
  • England England (uken)
  • Europe Europe (eu)
  • Estonia Estonia (ee)
  • Ecuador Ecuador (ec)
  • Faroe Islands Faroe Islands (fo)
  • Finland Finland (fi)
  • France France (fr)
  • Germany Germany (de)
  • Greece Greece (gr)
  • Guatemala Guatemala (gt)
  • Hong Kong Hong Kong (hk)
  • Honduras Honduras (hn)
  • Hungary Hungary (hu)
  • Iceland Iceland (is)
  • India India (in)
  • Indonesia Indonesia (id)
  • Israel Israel (il)
  • Iran Iran (ir)
  • Ireland Ireland (ie)
  • Italy Italy (it)
  • Japan Japan (jp)
  • Kazakhstan Kazakhstan (kz)
  • South Korea Korea (kr)
  • Kuwait Kuwait (kw)
  • Latvia Latvia (lv)
  • Libya Libya (ly)
  • Liechtenstein Liechtenstein (li)
  • Lithuania Lithuania (lt)
  • Luxembourg Luxembourg (lu)
  • Macau Macau (mo)
  • Macedonia Macedonia (mk)
  • Malaysia Malaysia (my)
  • Maldives Maldives (mv)
  • Malta Malta (mt)
  • Mexico Mexico (mx)
  • Moldova Moldova (md)
  • Morocco Morocco (ma)
  • Namibia Namibia (na)
  • Netherlands Netherlands (nl)
  • New Zealand New Zealand (nz)
  • Northern Ireland Nicaragua (ni)
  • Nigeria Nigeria (ng)
  • Northern Ireland Northern Ireland (ukni)
  • Norway Norway (no)
  • Panama Panama (pa)
  • Pakistan Pakistan (pk)
  • Paraguay Paraguay (py)
  • Peru Peru (pe)
  • Philippines Philippines (ph)
  • Poland Poland (pl)
  • Portugal Portugal (pt)
  • Puerto Rico Puerto Rico (pr)
  • Romania Romania (ro)
  • Russia Russia (ru)
  • Scotland Scotland (uksc)
  • Serbia Serbia (rs)
  • Singapore Singapore (sg)
  • Slovak Republic Slovak Republic (sk)
  • Slovenia Slovenia (si)
  • South Africa South Africa (za)
  • Somalia Somalia (so)
  • Spain Spain (es)
  • Sweden Sweden (se)
  • Switzerland Switzerland (ch)
  • Taiwan Taiwan (tw)
  • Thailand Thailand (th)
  • Trinidad And Tobago Trinidad And Tobago (tt)
  • Turkey Turkey (tr)
  • Tunisia Tunisia (tn)
  • Ukraine Ukraine (ua)
  • United Arab Emirates United Arab Emirates (ae, uae)
  • United Kingdom United Kingdom (gb, uk)
  • United Nations United Nations (un)
  • USA USA (us)
  • Uzbekistan Uzbekistan (uz)
  • Venezuela Venezuela (ve)
  • Vietnam Vietnam (vn)
  • Wales Wales (ukwa)
  • Zimbabwe Zimbabwe (zw)

If the flag name is spelled incorrectly the page gets added to Category:Unrecognised Flag and a placeholder flag Placeholderflag.png is used to keep alignment consistent. This flag can optionally be added intentionally by writing "filler flag" or "ff".