<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://fanverse.click/index.php?action=history&amp;feed=atom&amp;title=Template%3AFlag_icon%2Fdoc</id>
	<title>Template:Flag icon/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://fanverse.click/index.php?action=history&amp;feed=atom&amp;title=Template%3AFlag_icon%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://fanverse.click/index.php?title=Template:Flag_icon/doc&amp;action=history"/>
	<updated>2026-04-13T02:58:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://fanverse.click/index.php?title=Template:Flag_icon/doc&amp;diff=4666&amp;oldid=prev</id>
		<title>Mob: Created page with &quot;{{documentation subpage}} &lt;!-- Categories go at the bottom of this page and interwikis go in Wikidata. --&gt; {{high-use}}  &#039;&#039;&#039;Template:{{TEMPLATENAME}}&#039;&#039;&#039; displays a flag of the named parameter in &quot;icon&quot; size, currently 23×15 pixels maximally (defined in Template:{{TEMPLATENAME}}/core), plus a one-pixel border. The image also has a clickable link to the associated article. For an unlinked flag icon, use Template:Flag decoration instead.  Please consider the Wiki...&quot;</title>
		<link rel="alternate" type="text/html" href="https://fanverse.click/index.php?title=Template:Flag_icon/doc&amp;diff=4666&amp;oldid=prev"/>
		<updated>2024-12-30T15:58:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{documentation subpage}} &amp;lt;!-- Categories go at the bottom of this page and interwikis go in Wikidata. --&amp;gt; {{high-use}}  &amp;#039;&amp;#039;&amp;#039;Template:{{TEMPLATENAME}}&amp;#039;&amp;#039;&amp;#039; displays a flag of the named parameter in &amp;quot;icon&amp;quot; size, currently 23×15 pixels maximally (defined in [[Template:{{TEMPLATENAME}}/core]]), plus a one-pixel border. The image also has a clickable link to the associated article. For an unlinked flag icon, use &lt;a href=&quot;/index.php?title=Template:Flag_decoration&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template:Flag decoration (page does not exist)&quot;&gt;Template:Flag decoration&lt;/a&gt; instead.  Please consider the Wiki...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{documentation subpage}}&lt;br /&gt;
&amp;lt;!-- Categories go at the bottom of this page and interwikis go in Wikidata. --&amp;gt;&lt;br /&gt;
{{high-use}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Template:{{TEMPLATENAME}}&amp;#039;&amp;#039;&amp;#039; displays a flag of the named parameter in &amp;quot;icon&amp;quot; size, currently 23×15 pixels maximally (defined in [[Template:{{TEMPLATENAME}}/core]]), plus a one-pixel border. The image also has a clickable link to the associated article. For an unlinked flag icon, use [[Template:Flag decoration]] instead.&lt;br /&gt;
&lt;br /&gt;
Please consider the [[Wikipedia:Manual of Style (icons)#Flags|Manual of Style section on flag]]s before using this template.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
{{tlc|{{TEMPLATENAME}}|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;|variant{{=}}|size{{=}}|noredlink{{=}}}}&lt;br /&gt;
&lt;br /&gt;
;{{para|1|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;}}: The first parameter is mandatory, and identifies the name of the country, region, city, etc. A full list of available values can be found in [[:Category:Country data templates]]. For example, [[:Template:Country data Peru]] is used when the &amp;#039;&amp;#039;name&amp;#039;&amp;#039; parameter is specified as &amp;lt;code&amp;gt;Peru&amp;lt;/code&amp;gt;. Many flags are also available via shortened &amp;quot;aliases&amp;quot;, such as standard three-letter country codes as specified by [[ISO 3166-1 alpha-3]], [[List of IOC country codes|IOC]], or [[List of FIFA country codes|FIFA]]. The list of available &amp;quot;aliases&amp;quot; is found in [[:Category:Country data redirects]].  Many of these country codes could be considered obscure, so it is recommended to use the full country name.&lt;br /&gt;
;{{para|variant}}: The second parameter is optional, and identifies a flag variant to be used instead of the standard flag. This is most often used for historical flags but can also be used to specify naval flags, sport-use flags, etc. The list of available flag variants for each country is documented on the specific page for the country data template. For example, [[Template:Country data Peru]] includes a description of each of the available flag variations for Peru. This parameter can be a named parameter (e.g.. &amp;quot;&amp;lt;code&amp;gt;variant=1815&amp;lt;/code&amp;gt;&amp;quot;), or a positional parameter, always after the country name.&lt;br /&gt;
;{{para|size}}: This parameter is optional, and is used to specify the maximum width and/or height of the flag image. This parameter is specified using standard [[Wikipedia:Extended image syntax|image syntax]].&lt;br /&gt;
&lt;br /&gt;
==Template data==&lt;br /&gt;
{{TemplateData header}}&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template displays a wikilinked flag of the named parameter in &amp;#039;icon&amp;#039; size, currently 23×15 pixels (defined in Template:flag icon/core) plus a one-pixel border.&amp;quot;,&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;1&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Name&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Name of the country, region, city, etc.; full name is recommended for countries&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;variant&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Variant&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Identifies a flag variant to be used instead of the standard flag, e.g. 1815&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: false,&lt;br /&gt;
			&amp;quot;aliases&amp;quot;: [&lt;br /&gt;
				&amp;quot;2&amp;quot;&lt;br /&gt;
			]&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;size&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Maximum dimension&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;The maximum width or height, specified via standard &amp;#039;extended image syntax&amp;#039; (e.g. x30px)&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: false&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;noredlink&amp;quot;: {&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;No redlink&amp;quot;,&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;If set to any value which evaluates as true (i.e. &amp;#039;1&amp;#039;, &amp;#039;true&amp;#039;, &amp;#039;yes&amp;#039;, or &amp;#039;y&amp;#039;), it displays nothing if the country data file doesn&amp;#039;t exist. (The default is to display a redlink)&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: false&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Wikicode !! Results !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Peru}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|Peru}} ||&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|PER}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|PER}} || Uses the ISO/IOC/FIFA country code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Peru|1822}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|Peru|1822}} || rowspan=&amp;quot;2&amp;quot;| Specifies a historical flag&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Peru|variant=1822}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|Peru|variant=1822}}&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|PER|naval}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|PER|naval}} || Specifies the naval ensign&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|PER|air force}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|PER|air force}} || Specifies the air force flag&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Peru|size=50px}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|Peru|size=50px}} || Sets width to 50 pixels&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Xanadu}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || [[Template:Country data Xanadu]] || No flag for Xanadu, so displays redlink&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Xanadu|noredlink=yes}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; || {{flag icon|Xanadu|noredlink=yes}} || No flag, so displays nothing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Implementation notes==&lt;br /&gt;
This template uses the data templates listed under [[:Category:Country data templates]], which contain the data specifying &amp;#039;&amp;#039;&amp;#039;what&amp;#039;&amp;#039;&amp;#039; to display and the formatter [[Template:flag icon/core]], which contains the logic of &amp;#039;&amp;#039;&amp;#039;how&amp;#039;&amp;#039;&amp;#039; to display the flag.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Peru}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag icon|Peru}} — uses [[Template:Country data Peru]]&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|PER}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag icon|PER}} — uses [[Template:Country data PER]], which is a redirect to [[Template:Country data Peru]]&lt;br /&gt;
&lt;br /&gt;
Inside each country data template, this template uses the following parameters:&lt;br /&gt;
* &amp;lt;code&amp;gt;flag alias&amp;lt;/code&amp;gt; — name of the image file to display&lt;br /&gt;
* &amp;lt;code&amp;gt;flag alias-xxxx&amp;lt;/code&amp;gt; — name of the image file of flag variant &amp;lt;code&amp;gt;xxxx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;alias&amp;lt;/code&amp;gt; — used to display the [[alt attribute]] of the image (defaults to &amp;quot;Flag of &amp;#039;&amp;#039;alias&amp;#039;&amp;#039;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Tracking categories ==&lt;br /&gt;
*{{clc|Pages using flag icon template with unknown parameters}}&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|Foo}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; is used, but the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;Template:Country data Foo&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; does not exist, then a [[WP:Red link|redlink]] is displayed, &amp;#039;&amp;#039;unless&amp;#039;&amp;#039; the {{para|noredlink|yes}} parameter has been set.&lt;br /&gt;
&lt;br /&gt;
Where the redlink is displayed, the page is added to a tracking category:&lt;br /&gt;
&lt;br /&gt;
* [[:Category:{{BASEPAGENAME}}s missing country data templates]] (population: {{PAGESINCATEGORY:{{BASEPAGENAME}}s missing country data templates}})&lt;br /&gt;
&lt;br /&gt;
==Related templates==&lt;br /&gt;
* [[Template:Flag]] is used to display a wikilinked name next to the flag. The displayed name will be the same as the parameter used with the template, but the link target will be the main article for the country (in these examples, [[Peru]]).&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag|Peru}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag|Peru}}&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag|PER}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag|Peru}}&lt;br /&gt;
* [[Template:Flag country]] is also used to display a wikilinked name next to the flag.  The displayed name will always be the same, regardless of whether or not a country code alias is used as the template parameter.&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag country|Peru}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag country|Peru}}&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag country|PER}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag country|PER}}&lt;br /&gt;
* [[Template:Flag decoration]] displays an unlinked flag icon without country name.&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag decoration|Peru}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; → {{flag decoration|Peru}}&lt;br /&gt;
For a full list of flag templates, see [[:Category:Flag template system]].&lt;br /&gt;
&lt;br /&gt;
==Alternatives to avoid Wikipedia&amp;#039;s [[WP:PEIS|Post-expand include size]] limit==&lt;br /&gt;
Pages with many flag icons may come close to or exceed Wikipedia&amp;#039;s [[WP:PEIS|Post-expand include size]] limit.  In these cases consider using modules or module-wrapper templates instead:&lt;br /&gt;
* {{template link|flagg}} is a simple wrapper for [[Module:Flagg]]: For basic use, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;country&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; can be replaced with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flagg|cxxlo|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;country&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
* {{module link|flag|icon}} is a wrapper for [[Module:Flagg]] that can further reduce sizes when invoked directly. For basic use, &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{flag icon|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;country&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; can be replaced with &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:flag|icon|&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;country&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Template:Flagicon image]]&lt;br /&gt;
* [[Template:Coat of arms]]&lt;br /&gt;
* [[Wikipedia:WikiProject Flag Template]]&lt;br /&gt;
* [[Regional indicator symbol]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Flag template system|icon]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mob</name></author>
	</entry>
</feed>