Jump to content

Template:Flag

This documentation is imported from Template:Flag/doc

Shows a country's flag icon, linked to that country's page. If no flag is known for the given country, falls back to plain linked text (using Tag) instead.

{{flag|<country>|<size>}}

Country is not case-sensitive; see Template:Flag/id for accepted names/aliases. Size is optional and follows normal image syntax (e.g. 50px); it defaults to 22px. The image is always shown frameless.

{{flag|uk}}United Kingdom

{{flag|united kingdom}}United Kingdom

{{flag|uk|50px}}United Kingdom

To add a new country: upload the flag image (or reuse one already in ), add a line to Template:Flag/image mapping the country's exact page title to the file name (without the File: prefix), then add the lowercase name/aliases to Template:Flag/id pointing at that same page title. The id value is used both as the image lookup key and as the link target, so it must exactly match a page title in .

Supported countries

Code Output
{{flag|uk}} United Kingdom
{{flag|us}} United States of America
{{flag|albania}} Error creating thumbnail: File missing
{{flag|armenia}} Armenia
{{flag|australia}} Australia
{{flag|austria}} Austria
{{flag|azerbaijan}} Azerbaijan
{{flag|belgium}} Belgium
{{flag|canada}} Canada
{{flag|china}} China
{{flag|colombia}} Colombia
{{flag|cuba}} Cuba
{{flag|czech republic}} Czech Republic
{{flag|dominican republic}} Dominican Republic
{{flag|france}} France
{{flag|georgia}} Georgia
{{flag|germany}} Germany
{{flag|ghana}} Ghana
{{flag|haiti}} Haiti
{{flag|honduras}} Honduras
{{flag|iran}} Iran
{{flag|iraq}} Iraq
{{flag|ireland}} Ireland
{{flag|israel}} Israel
{{flag|italy}} Italy
{{flag|jamaica}} Jamaica
{{flag|japan}} Japan
{{flag|malaysia}} Malaysia
{{flag|mexico}} Mexico
{{flag|netherlands}} Netherlands
{{flag|new zealand}} New Zealand
{{flag|north korea}} North Korea
{{flag|panama}} Panama
{{flag|peru}} Peru
{{flag|philippines}} Philippines
{{flag|puerto rico}} Puerto Rico
{{flag|russia}} Russia
{{flag|saudi arabia}} Saudi Arabia
{{flag|senegal}} Senegal
{{flag|serbia}} Serbia
{{flag|south korea}} South Korea
{{flag|soviet union}} Soviet Union
{{flag|spain}} Spain
{{flag|switzerland}} Switzerland
{{flag|syria}} Syria
{{flag|thailand}} Thailand
{{flag|uae}} United Arab Emirates
{{flag|vietnam}} Vietnam
{{flag|eu}} European Union

Countries with no flag image mapped yet (text fallback)

Code Output
{{flag|no such country}} no such country