Template talk:Flag/Archive 1

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1

Palestine

{{Edit fully-protected}}

Please change Image:Palestinian flag.svg to Image:Flag of Palestine.svg. Thanks. Siebrand 23:01, 5 May 2007 (UTC)

The place to make that change is Template:Country data Palestine, which is not protected. CMummert · talk 15:34, 8 May 2007 (UTC)
Hmm, I already made that change. I have been mistaken. Thanks for checking here... Cheers! Siebrand 15:39, 8 May 2007 (UTC)

The United States flag isnt showing, it says the words "flag of United States". Can someone fix that. BeckyAnne(talk) 22:20, 14 September 2007 (UTC)

This happens from time to time, and is not a problem with this template. The image cache on Commons needs to be cleared. Andrwsc 22:32, 14 September 2007 (UTC)
Thanks for the little wiki lesson, I need those from time to time. BeckyAnne(talk) 23:12, 14 September 2007 (UTC)
  • I really would like an option to disable the display of these silly (IMHO) flag icons. RedWolf 02:00, 19 September 2007 (UTC)

 Kosovo has default alternative text "Flag of Kosovo". That's not a flag of Kosovo, it's the flag of the United Nations! Can someone fix that? (Stefan2 20:25, 23 October 2007 (UTC))

 Done Andrwsc 20:50, 23 October 2007 (UTC)

Issues with wikitables

Some of the flags screw up the parsing of wikitables. I've noticed this with the Canadian and English flags. But, this only happens when the row definition of the wikitable is in one line as opposed to it being broken up into individual lines per field/cell. Samples: non-working example: {| class="wikitable" !Field1
!Field2
!Field3
|-
|{{flag|USA}}||USA||howdy
|-
|{{flag|Canada}}||Canada||eh?
|-
|{{flag|Spain}}||Spain||hola
|-
|{{flag|England}}||England||cheers
|}
results in:

Field1 Field2 Field3
 USA USA howdy
 Canada Canada eh?
 Spain Spain hola
 England England cheers

working example: non-working example: {| class="wikitable"
!Field1
!Field2
!Field3
|-
|{{flag|USA}}||USA||howdy
|-
|{{flag|Canada}}
|Canada
|eh?
|-
|{{flag|Spain}}||Spain||hola
|-
|{{flag|England}}
|England
|cheers
|} results in:

Field1 Field2 Field3
 USA USA howdy
 Canada Canada eh?
 Spain Spain hola
 England England cheers

Any idea why this is happening with only some flags? --Kimontalk 16:42, 12 December 2007 (UTC)

Unwanted line break

{{editprotected}} For many countries (such as England) this template is now forcing a line break. (see Open de France) It makes many lists very hard to read, can anyone fix this? —MJBurrageTALK • 17:23, 12 December 2007 (UTC)

User:East718 has added {{pp-template}} to hundreds of country data templates, adding a line break to all of them. Damn. I shall try to fix this ASAP. Andrwsc (talk) 18:35, 12 December 2007 (UTC)
Glad to see someone is already working on this, as I have spent the past hour trying to figure out what was wrong with List of islands of the United States by area. Let me know if there is anything I can do to help. --Kralizec! (talk) 20:27, 12 December 2007 (UTC)
That would explain why I'm seeing what I posted in the section above. --Kimontalk 21:45, 12 December 2007 (UTC)
 Fixed All 893 country data templates have been repaired, so if you are seeing any more wierdness, try purging the template, clearing your own browser cache, or just wait for the servers to catch up... Andrwsc (talk) 21:47, 12 December 2007 (UTC)
Removing EPP, this appears to be fixed. Gimmetrow 16:35, 13 December 2007 (UTC)

Burma/Myanmar

Fix please For some reason, all of the country data outputs read "Burma" just like the main article, except {{flag|Myanmar}} which still reads "Myanmar." -Justin (koavf)·T·C·M 18:34, 9 January 2008 (UTC)

There is nothing to fix; this is precisely how it is intended. If you want your wikilink to display as "Burma", use {{flag|Burma}}. If you want your wikilink to display as "Myanmar", use {{flag|Myanmar}}. There are many contexts in which "Myanmar" is still the most appropriate name (United Nations, Olympics, FIFA, etc.), so that option is available for editors. In both cases, the flag template links to the Wikipedia target article at Burma, so no redirects are used. — Andrwsc (talk · contribs) 18:44, 9 January 2008 (UTC)

Nepal's flag broke

List_of_countries_by_population, this template is working improperly, showing the full Nepalese flag instead of a shrunk version. -130.215.112.208 (talk) 19:27, 9 April 2008 (UTC)

 Fixed Sorry! I was working on a solution to remove the border, as it looks odd with this flag, and I tested my solution. Interestingly, it worked when {{flag|Nepal}} is invoked in "normal" wiki text, but inside tables it broke spectacularly, as you saw. I shall investigate further. — Andrwsc (talk · contribs) 20:03, 9 April 2008 (UTC)

Interwiki

Please add da:Skabelon:Flag User:Nillerdk (talk) 20:29, 24 April 2008 (UTC)

Croatia

Please use Image:Civil Ensign of Croatia.svg as Croatian flag icon. --Maestral (talk) 13:28, 1 June 2008 (UTC)

Why? — Andrwsc (talk · contribs) 15:25, 1 June 2008 (UTC)

Question on using this template in lists

List of Los Angeles Lakers first and second round draft picks and other NBA and other similar lists use a nationaly column for the players, so is it possible to display these templates so that the country name isn't wikilinked. because currently it just creates over-wikilinking of the countries. --Gman124 talk 23:42, 27 June 2008 (UTC)

Instead of using {{flag|USA}}, just use {{flagicon|USA}} USA. — Andrwsc (talk · contribs) 17:51, 28 June 2008 (UTC)

Switzerland

The current {{flag|Switzerland}} template, gives a 20x20px image. While all others are 22x15px. This causes tables to be out of line a bit. Perhaps it can be changed to 15x15 (with style="margin: 0px 3px 0px 2px"), or a 22x15 format - even though the official format is a square. =Species8473= (talk) 12:32, 17 July 2008 (UTC)

The current flag template system does not support unique sizing per flag. The current size of 22x20px was chosen as a "best fit" compromise for 3:2, 5:3, 2:1, and even 1:1 flag aspect ratios, so that's why you see a maximum width of 22 pixels and a maximum height of 20 pixels. I don't think there is anything we can easily do for this template (i.e. {{flag|Switzerland}}), but I've changed Template:CHE (also used through the redirect at {{SUI}}) so that it bypasses the flag template system and renders the flag directly, thereby allowing the custom size and spacing. Hopefully this is a useful alternative for you. — Andrwsc (talk · contribs) 18:19, 17 July 2008 (UTC)
I don't like it. Both "Flag|Switzerland" and "CHE" should render the same size and Just Work™. It should be simple and not confusing in a way that won't be noticeable by the mass that does not care for two different sizes.--Bxj (talk)
please add the arabic interwiki ar:قالب:علم ar:قالب:علم--Heshamdiab116 (talk) 13:14, 12 November 2008 (UTC)

problems with some proportions

Many flags don't show up properly, including those with the proportions 1:2 (Ireland, UK, UAE, Hungary, Nigeria, Malaysia, Kuwait), 1:19 (US), and 3:5 (Bangladesh). Those flags have a "blank" stripe at the top of their symbols. Could you please change that? Thanks, Ibn Battuta (talk) 18:25, 9 December 2008 (UTC)

I think you are referring to the standard border attached to almost all flags. — Andrwsc (talk · contribs) 19:09, 9 December 2008 (UTC)

Text Alignment

The text doesn't seem to be aligned with the flag properly; it is slightly higher.

 United Kingdom

ajmint (talkemailcontribssubpages) 16:08, 17 December 2008 (UTC)

Northern Ireland flag needs removal

This needs to be removed there is no active flag for Northern Ireland and it's misleading when you add Northern Ireland to the list of countries in an article (using the flag template since the others all do) it uses the old one that hasn't been used for decades

http://wikipedia.org/wiki/Great_Britain?action=history for an example of the confusion this can cause

--87.112.55.149 (talk) 20:13, 14 January 2009 (UTC)

Discussed extensively elsewhere. The solution is to use that template only for appropriate articles, not to delete it so that it can't be used on any article. And "hasn't been used for decades" is a POV that is untrue. See the FIFA, CGF and PGA TOUR websites for three high-profile, contemporary, reliable sources that use that flag. — Andrwsc (talk · contribs) 20:39, 14 January 2009 (UTC)
Just because sports websites use it doesn't mean it's currently in use for any country/locality officially - it simply is not, so it shouldn't be on here any more than a flag for London should be... --87.112.55.149 (talk) 22:49, 14 January 2009 (UTC)
I think you completely miss the point. Just because a template is inappropriate to use on some pages doesn't mean we should delete it so that it can't be used on any page. Regardless, this talk page is clearly not the best place for this discussion. If you feel there could be consensus, feel free to nominate Template:Country data Northern Ireland and Template:NIR for deletion, and let the discussion take place on the TfD page. — Andrwsc (talk · contribs) 23:07, 14 January 2009 (UTC)
The Ulster Banner is the flag of the IFA and you will find most the the usage on wiki of this flag is for soccer players Gnevin (talk) 17:10, 24 January 2009 (UTC)

Northern Ireland

 Northern Ireland: This flag apparently is wrong. When using it, it is edit-warred out. Even to the point of reverting whole other changes that have nothing to do with this flag. You can not blame me for an error in this template when I use it. If Northern Ireland currently has no flag, it should not be used in this template. If somebody would want to use the 'old' flag (which it apparently is), they should not do it using a template afaik meant for showing current flags. nftaDaedalus (talk) 00:58, 6 February 2009 (UTC)

alt text

According to WP:MOS MOS:FLAGS flags (all flags) should have text for the visually impaired. To provide alt text, simply add the description to the end of the image markup: [[Image:PictureName.jpg|300px|right|Description of the image]]. The United States flag and all the examples on this template page do not have alt text. SunCreator (talk) 04:16, 20 March 2009 (UTC)

The alt attribute was removed a few weeks ago because of negative feedback about WP:Accessibility. This template is used for "inline" icons, not standard images to the left or right of article prose as in your example. Therefore, screen readers would say "flag of the United States United States" when rendering the output of {{flag|United States}}, for example. It was felt that the screen reader output should only say the country name, which is why the alt attribute was disabled. — Andrwsc (talk · contribs) 04:29, 20 March 2009 (UTC)
I don't understand how you say it would be "flag of United States United States", it currently is blank entirely without an country name. SunCreator (talk) 11:50, 20 March 2009 (UTC)
What I mean is that this template always renders both the flag and the country name. For example, {{flag|United States}} United States. If the image had the alt attribute set (as it used to), a screen reader would say "flag of the United States" for the image, followed by "United States" for the wikilink, or a complete result of "flag of the United States Unites States". It is much better to simply say "United States", which means the alt attribute should be blank for the image and only the wikilink is read. — Andrwsc (talk · contribs) 16:39, 20 March 2009 (UTC)
I'm afraid this analysis is incorrect. When a typical screen reader sees an image with a link but no alt text, it reads the title of the image (or even the image URL, if that's all it has), because the image has a function (the link) which the user may need to know about. For example, for " United States" a screen reader might say something like "Flag of the United States period ess vee gee United States". To fix the problem, the image should not have a link, as discussed in WP:ALT #When to specify. For example, for " United States" (where the image itself is not linked) a screen reader might say just "United States", which is much better. I have followed up with the obvious fix proposal at Wikipedia talk:WikiProject Flag Template #Fix for accessibility disaster. Eubulides (talk) 07:42, 12 July 2009 (UTC)

African Union

Any chance of getting a flag template for the African Union? Thanks. - Jonathon A H (talk) 21:37, 24 July 2009 (UTC)

No chance, as File:Flag of the African Union.svg is copyrighted, and can only be used on a very limited number of pages (i.e. on African Union and Flag of the African Union, but that's about it) per WP:Non-free content criteria policy. This is the same situation as we have with the NATO flag, for which no flag template exists (or can exist). — Andrwsc (talk · contribs) 21:42, 24 July 2009 (UTC)

Proposal for documentation

Please see my proposal to use centralized documentation for all uses of the flag template. —TheDJ (talkcontribs) 12:38, 6 December 2009 (UTC)

World Bank

I've seen that some one has attempted to use this template on the Humanitarian response to the 2010 Chile earthquake under Intergovernmental organizations in conjunction with the World Bank.

However World Bank has no actual "entry" here as far as I can tell, as this is what appears:

 [[File:|22x20px|border |alt=|link=]] World Bank

I was going to add it in myself, however I don't believe I can do easily without risking breaking the template, so I'm asking if someone else who knows what they're doing can do it. -- Droideka75 (talk) 06:55, 2 March 2010 (UTC)

There is no flag for the World Bank, so there shouldn't be an attempt to use a flag template in those articles. Also, File:World Bank Logo.svg is a non-free image, and therefore cannot be used as a non-flag icon for the World Bank in those articles either. — Andrwsc (talk · contribs) 17:23, 17 May 2010 (UTC)

Non-breaking space

{{editprotected|Template:Flag}} I have come across another line break issue. I don't know what was the problem above but could someone add an NBSP between the flag icon and the name string? E.g. if you have a look at {{States of Germany}} you'll see some nasty breaks depending on your screen width. De728631 (talk) 22:20, 16 May 2010 (UTC)

This seems to be an issue with Template:Country flag2, which does actually use a non-breaking space. So I'm not sure what's going wrong. I'll ask Andrwsc to comment. — Martin (MSGJ · talk) 14:56, 17 May 2010 (UTC)
Yes, there has always been an   used with this template, and you can verify that with the output of Special:ExpandTemplates. I'm not sure why that non-breaking space is not being respected. — Andrwsc (talk · contribs) 17:20, 17 May 2010 (UTC)
I noticed that the &nbsp; is inside the <span> tags, could that be the reason? Maybe only the icon file itself should be included. De728631 (talk) 19:16, 17 May 2010 (UTC)
Nope, I just previewed the output HTML markup for {{States of Germany}} minus those spans and it still renders the same. — Andrwsc (talk · contribs) 19:28, 17 May 2010 (UTC)
Well previewing templates doesn't seem to work anyway, at least not for me. For some reason certain changes always take a while to become visible even when they're fully implemented and saved. De728631 (talk) 19:50, 17 May 2010 (UTC)

Taiwan

Currently {{TWN}} produces " Taiwan". What can be done to display "Taiwan Taiwan (Republic of China)"? 203.198.25.249 (talk) 12:40, 17 May 2011 (UTC)

I don't think we need to resolve the display to "Republic of China". The default link is already redirected to Republic of China. De728631 (talk) 16:58, 17 May 2011 (UTC)
You can use {{flag|ROC|name=Taiwan (Republic of China)}} to get  Taiwan (Republic of China). If you really don't want the "Taiwan" text to be part of the wikilink, then you can use {{flagdeco|ROC}} Taiwan ([[Republic of China]]) to get precisely what you've asked for above. — Andrwsc (talk · contribs) 18:36, 17 May 2011 (UTC)

Northern Ireland

What flag should be displayed for the province? The flag in FIFA event, or the Union Flag? 203.198.25.249 (talk) 12:40, 17 May 2011 (UTC)

What is the context of the flag usage? In some contexts, no flag is appropriate, in others, the Ulster banner is acceptable. — Andrwsc (talk · contribs) 18:36, 17 May 2011 (UTC)

U.S. flag

It would be better to use the Pantone colors like this flag : — Preceding unsigned comment added by Mightymights (talkcontribs) 21:42, July 29, 2011 (UTC)

Edit request: Flag of western Sahara

Hi,
Can you please replace the flag used for Western Sahara by this, per WP:NPOV and Wikipedia:Western Sahara Infobox/Vote.

The territory is disputed, displaying that flag to refer to the territory is clearly partisan. Consensus already reached, for the change of the flag at the page linked above. The flag that currently appears should only be under {{flag|SADR}} or {{flag|Sahrawi Arab Democratic Republic}}
Regards --Tachfin (talk) 08:02, 21 August 2011 (UTC)

Also, take this consensus into account --Tachfin (talk) 08:29, 21 August 2011 (UTC)
That's not a flag, so shouldn't be used for a flag icon per WP:MOSICON. The better solution would be to update transclusions of Template:Country data Western Sahara and Template:Country data ESH, but in any case, there is nothing whatsoever that needs to be done to this template. — Andrwsc (talk · contribs) 19:06, 23 August 2011 (UTC)

I think that Libya deserves a flag makeover. Who is in favor of recognizing the NTC? Rainbow Dash !xmcuvg2MH 01:29, 24 August 2011 (UTC)

Wikipedia is not a soapbox. I would wait until there's official recognition by the UN of the transition of power. Wikipedia can wait a month or so for this. --Bxj (talk) 03:12, 24 August 2011 (UTC)
It seems that it has already been done. Considering that many countries already recognise the NTC, I don't think it's much of an issue. EricLeb01 (Page | Talk) 00:52, 12 September 2011 (UTC)

Linking to articles other than the main country article

The page List of countries with floating currencies uses this template for every country on the list, but for that page, it makes more sense to link to the article on the country's currency. Is this possible with this template? D O N D E groovily Talk to me 23:41, 6 February 2012 (UTC)

Similarly, on historical articles it is sometimes more appropriate to link to a historical country's article. E.g. {{flag|SVK|1938|name=Slovak Republic}} Slovak Republic where the link is to Slovakia, but should be to Slovak Republic (1939-1945). In this particular case the choice of link target could probably be resolved via the country data templates. Hairy Dude (talk) 00:51, 15 June 2016 (UTC)
There is a separate data template for the WWII Slovak Republic: {{flag|Slovak Republic (1939–1945)|name=Slovak Republic}} Slovak Republic. You can set the article to link to using the {{flagg}} template, though creating a new data template is the better solution for linking to a historical country with its own article. SiBr4 (talk) 20:36, 15 June 2016 (UTC)
The {{flagcountry}} template is most commonly used for these situations. {{flagcountry|Slovak Republic (1939–1945)}} produces  Slovakia. — Andrwsc (talk · contribs) 00:25, 28 June 2016 (UTC)

Non-breaking space

Would it be possible for the space between the flag and the label to be a non-breaking space? There are sometimes situations where the flag appears at the end of a line and the corresponding text is at the start of the next one. (See Indian Ocean#Bordering countries and territories for example, although I suppose it depends on your screen size.) I think it would be better if the flag and text were always adjacent. Bazonka (talk) 06:39, 23 July 2012 (UTC)
I've just noticed that this has already been discussed earlier on this talk page. In any case, it's still not fixed, so worth revisiting. Bazonka (talk) 06:41, 23 July 2012 (UTC)

Seems unlikely an IP editor will get a reply if you didn't, but the problem you describe still remains, two months later. 67.101.5.42 (talk) 05:53, 26 September 2012 (UTC)
I've had another look at it and have now checked the documentation at Wikipedia:WikiProject Flag Template. It says that the template invokes the following line of code ({{Flag/core}}):
<span class="flagicon">[[File:Flag of Spain.svg|22x20px|border |alt=|link=]]&nbsp;</span>[[Spain]]
Example with unwanted line break:
Foo
Administration
xxxxxxxxxx xxxxxxxxxxxxxxxxxxxx Spain
A quick workaround might be wrapping a <div> around the existing code in {{Flag/core}}, like
<div><span class="flagicon">[[File:Flag of Spain.svg|22x20px|border |alt=|link=]]&nbsp;</span>[[Spain]]</div>
which produces
Foo
Administration
xxxxxxxxxx xxxxxxxxxxxxxxxxxxxx
I'm not much of a template coder but I can't see how this change would cause any bugs. So I suggest we implement that. De728631 (talk) 13:40, 27 September 2012 (UTC)
P.S. on a second look, a simple <div></div> won't work because it creates columns. Nowrap should do it though, and there is a huge unanswered list of proposals at Template talk:Flag/core#Proposals: Specify “link=” value and nowrap flag image with text. De728631 (talk) 13:54, 27 September 2012 (UTC)

Comment

Just to say that my instinct is that {{flag|X}} would deliver the flag of X, not the flag of X followed by X's name. In other words, it seems to me that {{flag|X}} should behave along the lines of {{flagicon|X}} rather than {{flagcountry|X}}. Hope that doesn't sound ungrateful, though. 213.246.91.158 (talk) 21:56, 14 November 2012 (UTC)

When these templates were developed 7 or 8 years ago, that would have been more logical. But now with hundreds of thousands of transclusions, it's too late to swap them, I think. — Andrwsc (talk · contribs) 00:01, 21 March 2013 (UTC)

Optionally not linking countries

Could we have an additional parameter, similar to 'links=no' on the {{lang-xx}} templates, to bypass linking of the country? The MOS recommends not linking well-known locations such as United States, for example, so this would provide that facility for flags too. Colonies Chris (talk) 15:16, 20 March 2013 (UTC)

Use {{flagu}}. — Andrwsc (talk · contribs) 23:59, 20 March 2013 (UTC)
Thanks. This template will be very useful for reducing overlinking. It would be helpful if it were documented at Wikipedia:WikiProject Flag Template. Colonies Chris (talk) 11:42, 27 March 2013 (UTC)

Fix Swiss/Nepal/Vatican flag height

The tall flags should be fixed to use height x17px (rather than default: 22x20px) so that they would fit typical line-height of text, but that involves padding their width by "&nbsp;" prepended before the country name=xxx. So, 5 templates would be affected to make the fix, using 20x17px as the size:

           Size 22x20px
text  France
text   Switzerland (as 22x20px)
text  Italy
text  Vatican City (as 22x20px)
text  India
text    Nepal   (as 22x20px)
text  Pakistan
           Size 20x17px
text  France
text    Switzerland (as 20x17px)
text  Italy
text   Vatican City (as 20x17px)
text  India
text     Nepal   (as 20x17px)
text  Pakistan

As shown in the table above, the "text" lines are evenly spaced when size of those 3 flags is reduced to 20x17px. Because the prior width of the Swiss/Nepal/Vatican flags was 20px, rather than 22px, then the added name-padding by &nbsp will also better align those flag names in current lists where they are being displayed. Only the Swiss/Nepal/Vatican flags would be affected by this change, and Template:Flagicon will never put &nbsp. Because the size code "20x17px" is so unusual, then it would be unlikely to be used as a custom size by editors showing flags, and the extra space would only be triggered when showing the name with the Swiss/Nepal/Vatican flags. As for performance considerations, a #ifeq function can run with 1/800 second, and so the formatting of flags by templates {flag} or {flagu} would increase by only 2/800 second for each flag shown in a page. Hence, showing 100 flags in a page would increase formatting by only 1/4 (2/8) second (0.250s) longer. Any questions? -Wikid77 (talk) 11:33, 3 June, revised 13:22, 8 June 2013 (UTC)

Reduce Swiss/Nepal/Vatican flags

As requested for over 2 years, the Swiss/Nepal/Vatican flag icons should be 20x17px. See related discussions:

To reduce the flag height, but still align country names, then 5 templates must be changed, as follows:

The sandbox version, Template:Flag/core/sandbox, contains the updated logic to align the smaller flag icons. After the templates have been updated, the following testcases should match:

Testing of results
{{flag|...}} Currently Expected comments
{{flag|Nepal}}    Nepal    Nepal (shift name +2 spaces)
{{flag|Germany}}  Germany  Germany (unchanged)
{{flag|Switzerland}}   Switzerland     Switzerland  (shift name +1 space)
{{flag|Vatican City}}  Vatican City  Vatican City (shift name +1 space)
{{flag|Italy}}  Italy  Italy (unchanged)
 
{{flagu|...}} Currently Expected comments
{{flagu|Nepal}}    Nepal    Nepal (shift name +2 spaces)
{{flagu|Germany}}  Germany  Germany (unchanged)
{{flagu|Switzerland}}   Switzerland     Switzerland  (shift name +1 space)
{{flagu|Vatican City}}  Vatican City  Vatican City (shift name +1 space)
{{flagu|Italy}}  Italy  Italy (unchanged)

Because the fixes, for flag height+alignment, have involved changing 5 related templates, for alignment within a wikitable, then it had remained uncorrected for over 4 years. Few people understood the interactions between {Country_data_Switzerland} and {Flag} with {Flag/core}, etc. Plus changing the sandbox versions, and showing the test results inside wikitables, can be very tedious to demonstrate the precise typesetting of 3 flag icons, among over 350 similar flags.
Impact: {flag/core} has "334,868 transclusions" and {country_data_Switzerland} has 27,409, etc. -Wikid77 (talk) 13:22, 8 June 2013 (UTC)

Thank you for the detailed release notes. These exceptions are now added as well to the experimental (and incomplete) Template:FlagiconLua - see diff.--QuimGil (talk) 05:20, 9 June 2013 (UTC)
Done. Thanks for your work, and for the detailed description of the changes. It made implementing this request pretty easy. Also, sorry about the long wait. Best — Mr. Stradivarius ♪ talk ♪ 10:37, 13 June 2013 (UTC)

Default sizes must use #if to work

19 June 2013: Unfortunately, because of empty parameter "size=" then using "{{{size|20x17px}}}" has failed to set the default size, which is replaced with the empty value as passed. Instead, the 3 {country_data...} templates must check "#if:{{{size|}}}" to set the default size. Also, some users think x17px is too high for their browsers, so 20x16px is being used for the Swiss and Vatican flags, but x17px for Nepal:

I have modified the table of flags, above, to show the x17px and x16px results in the "Expected" column, to compare results after updating those 3 templates. -Wikid77b (talk) 06:12, 19 June 2013 (UTC)

 Done De728631 (talk) 15:12, 19 June 2013 (UTC)
Is the done relative to the default size only or are the 3 flag sizes above also part of the decision? Sorry, I'm just trying to match the current implementation for Template:FlagiconLua.--QuimGil (talk) 15:21, 19 June 2013 (UTC)

Other flags

Have the other flag icons somehow been affected by this change? Only these three flags were supposed to change, but a lot of other icons now look very weird (Monaco, Niger, DR Congo, Norway, Denmark etc.). 92.81.68.23 (talk) 15:53, 4 August 2013 (UTC)

Alignment in table

Thread moved from Template_talk:flagicon:

Country Code
 USA 1
  CHE 2
   NPL 3
 GBR 4
When the flag or flagicon template is used in a table as in the example on the right, the country names are not aligned. Is there an option to make them aligned, for example, by putting appropriate margins on the icons so that they are all the same widths? Thanks! cmɢʟee୯ ͡° ̮د ͡° ੭ 13:06, 7 June 2013 (UTC)
This question is about Template:Flag and therefore could be better placed at Template_talk:Flag. Flagicon doesn't have label. (Your suggestion is good, but it would require a calculation of the right margin based on the size of the image. Technically doable, but requires improving the template.)--QuimGil (talk) 16:13, 7 June 2013 (UTC)
  • Similar to Swiss/Nepal/Vatican problem: Above, "#Fix Swiss/Nepal/Vatican flag height" describes a permanent fix, but for now, set the size as "x17px" with &nbsp spacing in each flag:
{{flag|&nbsp;Switzerland|size=x17px}}    Switzerland A
{{flag|GBR}}  GBR B
{{flag|&nbsp;&nbsp;NPL|size=x17px}}      NPL C
{{flag|&nbsp;Vatican City|size=x17px}}   Vatican City D
{{flag|USA}}  USA E
Even with the lead spaces "&nbsp;" each nation name is linked properly. -Wikid77 (talk) 11:03, 8 June 2013 (UTC)
code gives note
{{flagicon|ITA}} ABCDE Italy ABCDE
{{pxsp|3}}{{flagicon|SUI}}{{pxsp|4}} ABCDE Switzerland ABCDE 3px space on the left & 4px space on the right
{{flagicon|RUS}} ABCDE Russia ABCDE
{{pxsp}}{{flagicon|VAT}}{{pxsp|6}} ABCDE Vatican City ABCDE 1px space on the left & 6px space on the right
{{flagicon|USA}} ABCDE United States ABCDE
{{pxsp|6}}{{flagicon|NPL}}{{pxsp|5}} ABCDE Nepal ABCDE 6px space on the left & 5px space on the right
Maiō T. (talk) 23:54, 26 July 2013 (UTC)

Update: There is now {{flaglist}} which automatically aligns country names without having to manually add spaces. SiBr4 (talk) 21:50, 15 August 2014 (UTC)

Attn Sysops: Ascension Island new flag

Please replace the Union flag by the new Ascension Island Flag: Flag_of_Ascension_Island.png Thanks in advance, --— J. F. B. (me´n parlar) 18:14, 14 July 2013 (UTC)

I'm sorry but we can't use the new flag in a template because the design of the shield is copyrighted and unfree. The images of the flags of Ascension island are being used under a fair-use rationale for specific articles only, and the use in illustrative templates is not covered by our non-free content criteria. De728631 (talk) 18:29, 14 July 2013 (UTC)
I have made a request at Wikipedia:Graphics Lab/Illustration workshop#Flag and coat of arms of Ascension Island for an artist's help in generating a new image, but so far that request has been ignored. — Andrwsc (talk · contribs) 05:52, 15 July 2013 (UTC)

Korean Flag

The template {{Flag|Korea}}:  Korea links to a historical flag of Korea. The template {{Flag|KOR}}:  KOR has the correct one. Sander.v.Ginkel (talk) 09:59, 3 September 2013 (UTC)

You need to use {{flag|South Korea}} (or {{KOR}}). "KOR" is the country code for South Korea. Template:Country data Korea links to the article at Korea, which describes the historical state prior to the 1945 division. — Andrwsc (talk · contribs) 18:29, 3 September 2013 (UTC)

Coat of arms Priboj - new

http://priboj.rs/o-priboju/znamenja-opstine Markojanjusevic (talk) 02:46, 3 November 2013 (UTC)

 Not done. First of all, this template is for widely used flags like those of countries and provinces, but it's not meant for flags of individual towns that are unlikely to be used across Wikipedia. Apart from that there is currently no free image of particular this flag avalaible at Commons:Category:Priboj. De728631 (talk) 15:11, 3 November 2013 (UTC)

Kingdom of Yugoslavia

I edit articles about ships lost in the Second World War, in which templates to display historic flags are often useful. I have found how to do this for countries including Canada, Egypt, Greece, Palestine and Syria but not Yugoslavia. I assumed that the syntax for the Kingdom of Yugoslavia's flag would be {{flag|Yugoslavia|1918}} for the civilian flag. I have no idea what the syntax for the naval ensign (adopted in 1922) would be. Anyone please help? Thankyou, Motacilla (talk) 20:56, 12 December 2013 (UTC)

{{flag|Kingdom of Yugoslavia|naval}} Kingdom of Yugoslavia. Or use {{flagcountry}} for  Yugoslavia, where the link target is still Kingdom of Yugoslavia but the display text is simply "Yugoslavia". — Andrwsc (talk · contribs) 17:16, 13 December 2013 (UTC)

Edit request

Resolved
 – Fixed

Replace File:Flag of the Commonwealth of Nations.svg, which is pending deletion at Commons with File:Flag of the Commonwealth of Nations.jpg, which is a file I uploaded locally and tagged as "Do not move to commons". CourtlyHades296 (talk) 00:11, 24 December 2013 (UTC)

You already did that yourself by changing {{Country data Commonwealth of Nations}}. Just let the system get rid of the svg icons in the cache. If you look at my user sandbox you'll see that all these related templates now display icons based on the local jpg file. De728631 (talk) 01:58, 24 December 2013 (UTC)

Default sort

There are countries that have to be sorted in tables according to the main part of their names, instead of the first words of their names, e.g., the Federated States of Micronesia and the FYRO Macedonia have to be placed under #M, and the Republic of the Congo under #C. Is there any built-in default sort template within the {{flag}} template? 116.48.155.127 (talk) 21:06, 18 February 2014 (UTC)

Not built in. You have to use {{sort}}. — Andrwsc (talk · contribs) 00:48, 19 February 2014 (UTC)
Would it be better to have it built-in, or to add such an option? 116.48.155.127 (talk) 18:07, 19 February 2014 (UTC)
It would add a non-trivial amount of complexity to what needs to be a streamlined template. — Andrwsc (talk · contribs) 18:42, 19 February 2014 (UTC)
So would the solution be like {{sort | Congo, Republic of the | {{flag|Republic of the Congo}} }}, for example? 116.48.155.127 (talk) 16:09, 20 February 2014 (UTC)
Yes, precisely. — Andrwsc (talk · contribs) 16:24, 20 February 2014 (UTC)
Any chance adding it to the flag template? 116.48.155.127 (talk) 17:21, 20 February 2014 (UTC)
Say, adding a parameter like "|sort=Congo, Republic of the" 116.48.155.127 (talk) 17:23, 20 February 2014 (UTC)
Hello? 116.48.155.127 (talk) 18:03, 24 February 2014 (UTC)
That was already answered with "It would add a non-trivial amount of complexity to what needs to be a streamlined template."  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  00:52, 17 November 2014 (UTC)

kyrgyzstan

no Invalid

Unless I missed it, there doesn't appear to be a kyrgyzstan flag. Can we get it added? --CyberXRef 23:24, 20 February 2014 (UTC)

Scratch that, it's there, no action necessary. My bad! --CyberXRef 23:38, 20 February 2014 (UTC)

United States flag as used in flagicon

Cross-posted from Template_talk:Flagicon#United_States_flag (I don't know what the right place is for this.)

May I make a suggestion for the display of the US flag as an icon? The current default results in a icon of 23x12px. However the US flag has 13 stripes. The mapping of 13 stripes to 12 lines results in blurry stripes:

United States 23x12px: Icon width of 23px (currently the default)
United States 24x13px: Width of 24px

I don't know what the best answer to this is, but I would suggest either changing the default (for all) to 24px, or having an icon for the US flag with 23x13px (accepting that the proportions are then slightly off from the nominal 10:19). Tony Mach (talk) 18:24, 5 March 2014 (UTC)

Agree it looks better. Would there be any technical problem making all the flag icons a hair larger? It would be a boon to those of us with crappy eyesight, and have negligible other effect I can think of (even if some tables have been unwisely coded to use specific column widths, I believe they'd expand to encompass the content anyway, wouldn't they? If not, it's a good excuse to fix tables to stop using specific pixel-width columns. It would be a poor idea to make only this one flagicon display larger, as that would have a negative effect on display with other flags.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  00:36, 17 November 2014 (UTC)

Correct Swiss Flag

Request moved to the probably correct(?)/better place to be discussed: Template_talk:Country data Switzerland#Correct Swiss Flag

-- ZH8000 (talk) 03:41, 2 June 2014 (UTC)


Free France

This article was recently moved, and I'm not sure of where in Template:Country data France or Template:Country data Free French Forces changes have to be made (or moved to Template:Country data Free France), so that {{Flag|Free France}} creates a link to Free France, and not to Free French Forces as now. Thanks for any help. walk victor falk talk 09:40, 9 July 2014 (UTC)

The article linked to is specified by the |alias= parameter in a country data template (Country data Free French Forces in this case; Country data France always links to France). Whether the template is titled "Country data Free French Forces" or "Free France" does not matter for its output or usage as long as the other title is a redirect.
While it is usual for flag templates to directly link to the right article, the guideline WP:NOTBROKEN also applies. SiBr4 (talk) 10:13, 9 July 2014 (UTC)
Thank you for your help. FF and FFF are not synonyms, but two distinct but overlapping topics with one with a wider scope than the other that are treated within a single article, which introduces an issue of WP:EGG. walk victor falk talk 15:19, 9 July 2014 (UTC)
I'm with victor falk on this one; WP:NOTBROKEN doesn't apply in this case. A subtopic and the topic of which it is a subtopic are not the same thing.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  00:48, 17 November 2014 (UTC)

Swedish double-tailed flag

Missing British codes

The FIFA and ISO 3166-2:GB codes for Scotland and Wales differ. We already support FIFA's WAL and SCO but should also permit WLS and SCT, as we really can't expect anyone but experts in language code differences to distinguish between them. Some sports (snooker being one, if I recall correctly) use the ISO codes, since they're not football.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  23:20, 16 November 2014 (UTC)

Also, there are three ISO 3166-2:GB national codes we're not supporting yet: EAW (England and Wales = Union Jack minus the Scottish component); GBN (Great Britain = UK); UKM (United Kingdom = UK). The first of these has historic significance and has been a real flag, before union with Scotland. The other two are just the Union Jack again, and should be supported for completeness.  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  23:33, 16 November 2014 (UTC)

And more. Between ISO 3166-1 alpha-2, ISO 3166-1 alpha-3, and ISO 3166-2:GB I've found several more we're not supporting yet: IM (Isle of Man), GBM (Isle of Man), JE (Jersey), GBJ (Jersey), GG (Guernsey), GBG (Guernsey), GBA (Alderney).  — SMcCandlish ¢ ≽ʌⱷ҅ʌ≼  00:09, 17 November 2014 (UTC)

Of all ISO codes, currently only 3166-1 alpha-3 codes consistently exist as redirects; alpha-2 codes generally don't. The currently existing two-letter aliases are a jumble of ISO 3166-1 alpha-2 codes, postal codes for the US and Canada (equal to the ISO 3166-2 codes save for the US-/CA- prefix), and acronyms, none complete. To me those are not precedents to create redirects for the alpha-2 codes for the Crown Dependencies (GG, IM, JE).
GBG, GBM and GBJ, as well as GBA, are indeterminately reserved; the current actual alpha-3 codes of the CDs are GGY, IMN and JEY, which are existing data template aliases. No other indeterminate reservations exist as data templates except some which are current FIFA or IOC codes (BRU, SLO, WAL), and ROK as a special case. There are no ISO codes WLS, GBN etc. at all; the ISO 3166-2 codes for the subdivisions of the UK are GB-WLS, GB-GBN etc. The only ISO 3166-2 country data redirect that currently exists is IN-KA (Karnataka, India).
Also, since when is "Great Britain = UK"? SiBr4 (talk) 10:35, 17 November 2014 (UTC)

Commonwealth of Nations

The example for Commonwealth of Nations, in Examples, doesn't show the flag:

{{flag|Commonwealth of Nations|name=Cmnwlth}}

produces

{{flag|Commonwealth of Nations|name=Cmnwlth}}

with empty space where the flag should be. --Thnidu (talk) 04:33, 27 January 2015 (UTC)

This is intentional; see Template:Country data Commonwealth of Nations. Because no free image of the actual Commonwealth flag is available, a transparent placeholder image is used. SiBr4 (talk) 08:57, 27 January 2015 (UTC)
@SiBr4: Thank you for the explanation and the pointer. I've added your explanation, without signature (which would be out of place there) but with a pointer to this Talk §, to Template:Country data Commonwealth of Nations/doc. It appears on Template:Country data Commonwealth of Nations under Other information. Since that section is near the bottom of the page and it looks as though the image is simply missing, I've boldfaced the text to make it more conspicuous. --Thnidu (talk) 17:44, 28 January 2015 (UTC)

Addition that makes possible to use [[]] in the first parameter

Hello. I just added some code to the Template:Flag/sandbox, tested in three other wikipedias. It works very fine there. It makes possible to use [[ and ]] around the name of the country. If the template is used in infoboxes, it's now possible to use a little bit smaller code there to create a link to an article.

* {{Flag|USA}}
* {{Flag|[[USA]]}}
* {{Flag/sandbox|[[USA]]}}

returns

The added code use the Lua-module Module:String. Greetings --Tlustulimu (talk) 13:00, 28 April 2015 (UTC)

Need "link=" parameter or something similar to link to articles other than countries

Hi, it's been previously requested here and elsewhere that it would be useful to have the flag icon functionality but with the option to link to an article other than the main article for the country in question, e.g.  Peru appropriately links to Peru, but if the article is all about tennis, then linking to Tennis in Peru would be more appropriate, possibly with something like:

{{flag|Peru|link=Tennis in Peru}}

What does everyone think? Facts707 (talk) 16:42, 6 September 2015 (UTC)

Since adding parameters to most flag templates isn't as easy as it seems (it would require adding pass-through parameters to 6,214 templates), many separate templates exist with different output formats. For prefix links, like in your example, there is {{flag+link}}:
  • {{flag+link|Tennis in|Peru}} Peru
The general {{flagg}} can handle prefix/suffix links as well as normal country links, and allows overriding the link target in either case:
  • {{flagg|unc|Peru}} Peru
  • {{flagg|unc|Peru|link=Article title}} Peru
  • {{flagg|unp|Peru|pref=Tennis in}} Peru
  • {{flagg|unp|Peru|pref=Tennis in|flink=Article title}} Peru
SiBr4 (talk) 17:11, 6 September 2015 (UTC)
Wow, that's great - thanks much! I found {{flag-article}} but that one is intended to mark ("flag") an article for clarification/improvement. {{flag+link}} is memorable but the name seems to make it hard to find unless you know what you're looking for. Maybe we could consider renaming either or both of these templates? Thanks again for all the information! Facts707 (talk) 21:26, 6 September 2015 (UTC)
To me "flag article" or the like doesn't seem any more helpful than "flag+link". Either name implies the link target can be changed freely, which is not the case. "flagprefix" or similar would get my vote, as it suggests more clearly what the template does, and what the difference with {{flag}} is. (Template talk:Flag+link is a better place for a move request though.) SiBr4 (talk) 18:11, 7 September 2015 (UTC)

Zambia 1964 broken?

Zambia (1964) should have a darker shade of green than Zambia (current). It looks like it's set correctly in Zambia's Country data template, but it's not coming out right for some reason. Can someone fix this? If the dash in the file name is the problem, use Old Flag of Zambia.svg (which redirects to the same old flag). —Sygmoral (talk) 02:25, 18 November 2015 (UTC)

Fixed—variants don't work without this line. SiBr4 (talk) 07:41, 18 November 2015 (UTC)

Broken flags

Hi, the flags of  Jamaica,  Colombia,  Guinea-Bissau don't work currently. How to restore them? Wykx (talk) 21:18, 11 April 2017 (UTC)

It works again... Wykx (talk) 12:53, 12 April 2017 (UTC)

Bolivia flag

 Bolivia

The Bolivian flag doesn't include the coat of arms. Is this deliberate?Terrorist96 (talk) 03:45, 5 May 2017 (UTC)

ASEAN

Hi. I noticed in ASEAN–European Union relations that the flag of the Association of Southeast Asian Nations does not work in Template:Flag, Template:Flagicon as well as in Template:Infobox bilateral relations. It would be nice if it can be fixed by someone. Have a great day!--Concus Cretus (talk) 12:50, 23 May 2017 (UTC)

If you're referring to File:Flag of ASEAN.svg, then that file should not be added to templates. It's licensed as non-free content and therefore cannot be used in templates per WP:NFCC#9. -- Marchjuly (talk) 23:05, 23 May 2017 (UTC)

Crimea

 Crimea

The {{Flag|Crimea}} template gives a link to the Autonomous Republic of Crimea article, a clear violation of WP:NPOV. It should link to the Crimea article instead. Chessrat (talk, contributions) 00:24, 6 August 2017 (UTC)


Range and not arbitrary year

Would it be possible to have a "range" or "year range" variable which can be dynamically used to pick the right flag, based on the current year relevant to an article? For example, if you write an article covering a certain year (for example an event, a battle), and use that year in the {{flag}} template, would be great to get the correct flag from that year automatically. As in here:

  • {{flagicon|Germany|1870}}Germany
  • {{flagicon|Germany|1918}}Germany
  • {{flagicon|Germany|1919}}Germany
  • {{flagicon|Germany|1920}}Germany

Among many things, it would make it is possible to dynamically display the correct flags of the period, in articles like List of sovereign states in 1919. Codrin.B (talk) 14:03, 2 September 2017 (UTC)

North Dakota

{{flag|North Dakota}} displays with an extra space before the "N". Compare these three lines:

Joule36e5 (talk) 00:29, 14 September 2017 (UTC)

People's Republic of China

At United Nations Security Council the list of permanent members should have "People's Republic of China" in the "Current state representation" column. Unfortunately this template doesn't seem to allow changing the name from simply "China". {{flag|China|name=People's Republic of China}} yields  People's Republic of China, not (as expected)  People's Republic of China. Hairy Dude (talk) 17:21, 13 December 2017 (UTC)

Western Union

Hi. Please add File:Flag of the Western Union.svg for the Western Union, which existed between 1948 and 1954. - Ssolbergj (talk) 11:12, 19 April 2018 (UTC)

Ssolbergj, this is a meta template and doesn't directly include any flags (or flag information). If you want to create a template for use with the Western Union, you should make a post at the Flag Template WikiProject and request input/advice there. Primefac (talk) 12:17, 19 April 2018 (UTC)

Leading underline in TOC at List of railway companies

The Table of Contents at List of railway companies precedes each country with an underlined space. It's visually distracting. Entries that don't use the flag template don't have that space. Nepal has two spaces. What's the deal? SchmuckyTheCat (talk) 15:54, 25 March 2019 (UTC)

Entries in headers should not be using flags/images, which is why they appear in the TOC as spaces. It has nothing to do with this template specifically; it's how the software deals with images in a TOC. I have removed the flags from the headers. Primefac (talk) 16:09, 25 March 2019 (UTC)
thanks SchmuckyTheCat (talk) 01:52, 2 April 2019 (UTC)

US flag

  •  USA - All I happen to be seeing is a white box. Hope someone can figure out what is wrong and fix it. Psu256 (talk) 20:17, 15 April 2019 (UTC)
    Looks fine to me. Did you try on a different browser? Primefac (talk) 16:07, 16 April 2019 (UTC)
    Yes, but they were both belonging to Microsoft (Edge and IE) since that is all I have available in the office. Psu256 (talk) 17:13, 16 April 2019 (UTC)
    It's likely something on your end, if only because I checked IE on my computer and it appeared as usual. Is everything up-to-date? Primefac (talk) 18:58, 16 April 2019 (UTC)
    I doubt it. Updating isn't something corporate IT departments like to always do. I looked and they do have a May 2018 version of Firefox available. It looks fine using that. *shrug* Funny thing is, once I looked at it in Firefox... it is now showing up in Edge. I have no explanation. That's just baffling. Psu256 (talk) 19:30, 16 April 2019 (UTC)
    If I had to take a stab at it (it's been a while since I've compared the client-side storage of browsers) I'd guess that Firefox was able to pull the image, and it's now stored in a common temp folder that IE/Edge can get to. Glad you (somewhat) got it sorted out. Primefac (talk) 19:34, 16 April 2019 (UTC)

error when using template for Venice?

I commented-out a use of this template here. For some reason, the template breaks. Any idea what's happening? = paul2520 (talk) 16:58, 28 May 2019 (UTC)

Issue with {{country data Venice}}, which I've fixed. Primefac (talk) 17:28, 28 May 2019 (UTC)

Non-English place name abbreviations

Is there any justification, other than "it is in use a lot", for allowing abbreviations of the native version of country names? I am aware of ESP, DEU and EIR, I'm sure there are others, and while they might be widely recognised, I see no reason for their presence in en.wiki. There is no real consistency here: DAN does not return the Danish flag, nor MAG the Hungarian. Illogical and inconsistent, and not helpful to readers. Renders the alphabetical sorting of tables meaningless: Germany between Dominican Republic and East Timor? Why on earth would anybody want that? Kevin McE (talk) 18:00, 19 June 2019 (UTC)

I was under the impression this was because of the IOC or other globally-scaled organizations and what they used for their acronyms. I see zero reason why we should force people to type out the full name. Primefac (talk) 18:39, 19 June 2019 (UTC)
No-one is forcing anyone to type anything out in full: the three examples above are easily, and more appropriately, rendered with SPA, GER and IRE (or IRL). I don't see the relevance of how IOC or anyone else labels nations: they are multi-lingual organisations, and this is en.wiki. Kevin McE (talk) 22:19, 19 June 2019 (UTC)
Well, it's because the IOC and others use those codes. For example, IOC uses ESP so for sports-related articles (e.g. we use {{flagIOC|ESP}} Spain). Other times, we use the ISO code, which is the international codes for countries (the ISO code for Germany is DEU, as opposed to FIFA and IOC which use GER). As far as I'm aware, though, codes such as DAN or MAG are not used by any organization, which is why they're not used here. Primefac (talk) 12:58, 20 June 2019 (UTC)
Inputting 'ESP' and getting an output of 'Spain' is fine, if for some strange reason people want to input with codes not based on English. My objection is to those variants on the template that output ESP (or DEU, or EIR) to those wanting to read an English speaking encyclopaedia: {{flag|ESP}} ESP). This is what renders the alphabetical sorting of tables they are in erroneous, and is unjustifiable. Is it possible to have {{flag|ESP}} give a display of  SPA: that would resolve the issue, while still allowing the 'eccentric' input choice (and making wholescale re-entering unnecessary). Kevin McE (talk) 14:55, 20 June 2019 (UTC)
I think we then again circle back to context. If it's on an article on the Olympics, or other venue using IOC codes, then outputting  SPA would be inappropriate because the IOC country code is ESP. Forcing a template to do one thing when it most likely should be doing what the user inputted is bad coding. Primefac (talk) 15:07, 20 June 2019 (UTC)
I really do not believe that when our readers look at the encyclopaedia, they do so wondering what the IOC code for a medallist's country is: they want to know the medallist's nationality.
Are you actually suggesting that the coding should be changed so that ESP (a string not present in the name of any country in English) is displayed where it is not currently, resulting in Spain being shown between Eritrea and Estonia in alphabetical sorting? Kevin McE (talk) 15:47, 20 June 2019 (UTC)
No, I'm suggesting the code stay exactly as it is right now. It's irrelevant whether the reader wants to know the country code of an Olympic team - if it's not the right IOC code then it's wrong. There is hover text that tells what country it is, as well as a link that will bring them to the country in question. Primefac (talk) 15:58, 20 June 2019 (UTC)
It is not wrong if it is the intention to tell the name of the country. It is inappropriate if it makes sorting erroneous, and hover text is inconvenient for mobile users. Kevin McE (talk) 16:20, 20 June 2019 (UTC)

Even if we leave aside issues specific to some organisations (although I do not concede that point), what is the purpose or value in other examples, such as the most basic {{flag}} template. I believe that by obscuring the information it seeks to communicate, it is counter to the purpose of an encyclopaedia and should not be present in our pages at all. Kevin McE (talk) 16:20, 20 June 2019 (UTC)

This is actually another thing that I have been thinking about; I don't think we can do what you want with the technical limitations of the existing software, without either doing weird things or breaking stuff. Let's keep using ESP as an example:
  • {{flag|ESP}} calls {{country data ESP}}, which is a redirect to {{Country data Spain}}, which is why everything has to do with Spain (links etc)
  • {{flag}} also has a |name={{{name}}} param, which is the reader-facing display. It's used not only by {{country data Spain}} but also by {{Flag/core}} to determine the output text of the wikilink, which is why {{flag|SPA}} and {{flag|ESP}} both have the same end link as {{flag|Spain}} but show either SPA or ESP.
What it sounds to me like you are proposing is to have the {{flag}} template, regardless of input, output either "Spain" or "SPA". Would this be switched by a new parameter? Would it be dependent on input (e.g. using "ESP" automatically outputs "SPA" but "Spain" stays unchanged)? Do we not have a problem from an editing standpoint if I put in {{flag|ESP}} but get out  SPA? The first two are programming challenges that can possibly be coded without rewriting the entire backend of literally hundreds of templates, but I'm not sure the latter one would be acceptable to anyone coding these templates; WYSIWYG is kind of a big deal here. Primefac (talk) 16:42, 20 June 2019 (UTC)

Singapore

The template does not seem to work for Singapore.  Singapore Hektor (talk) 18:38, 8 July 2019 (UTC)

Hektor, I see a flag of Singapore and link there as well. What is it that you are seeing (or not seeing) that makes you think it is not working? Primefac (talk) 19:02, 8 July 2019 (UTC) (please do not ping on reply)
I saw a blank rectangle. Now it works. Hektor (talk) 19:55, 8 July 2019 (UTC)
Cool. Likely a cache/browser issue. Primefac (talk) 15:48, 9 July 2019 (UTC)

Khabarovsk Krai issue

The flag icon for Khabarovsk Krai does not show up. For an example of this problem, see Template:Country data Khabarovsk Krai. My knowledge of Wikipedia internals is insufficient to fix it. Please help. --46.242.13.121 (talk) 08:25, 26 July 2019 (UTC)

Same thing with Penza Oblast, see Template:Country data Penza Oblast. Other Russian regional flags work fine. --46.242.13.121 (talk) 08:39, 26 July 2019 (UTC)
This is likely a browser issue - there are a few posts above and in the archives that say similar things, but I see both flags as would be expected. Primefac (talk) 15:27, 26 July 2019 (UTC)
Thank you. It was, indeed, a browser issue. Here's what I did (Safari on macOS): 1) select "Safari > Preferences…" in the menu bar, 2) select "Privacy" tab, 3) click "Manage Website Data…" button, 4) in the search field, type "wikipedia", then select the corresponding row and click "Remove", 5) repeat the same for "wikimedia". Hopefully, this will help other Mac users who face the same problem. --46.242.12.2 (talk) 02:05, 27 July 2019 (UTC)

emilia-romagna

Emilia-Romagna (Italy) had the flag and logo on Commons on copyvio. They have been removed. I have replaced them with some adaptations, you can find them on commons:Category:Flags of Emilia-Romagna and commons:Category:Coats of arms of Emilia-Romagna --Gambo7 (talk) 22:03, 19 March 2020 (UTC)

USA

Should {{flag|USA}} render as  US, as per the MOS:NOTUSA guideline? Zarex (talk) 18:13, 14 April 2020 (UTC)

In a word, no. You're missing the last statement of NOTUSA, which involves uses such as with this template (i.e. FIFA or IOC country codes). Primefac (talk) 18:37, 14 April 2020 (UTC)

Hanover

While reading the article Seven Years' War, I noticed that this when this template calls "Hanover", the link is to the Prussian Province of Hanover, rather than the Electorate of Hanover (which is the one relevant to the Seven Years' War) or Kingdom of Hanover (which is what should be called for, say, Hundred Days). Is there some way to get these correct (without resorting to a kludge as has been done on Austro-Prussian War)? Lockesdonkey (talk) 17:19, 27 May 2020 (UTC)

Lockesdonkey, as far as I can tell, there are three country data templates with "Hanover" in the name. These can be used either with {{flag}} or {{flagcountry}}:
Country data template {{flag}} {{flagcountry}}
Template:Country data Hanover  Hanover  Hanover
Template:Country data Electorate of Hanover  Electorate of Hanover  Hanover
Template:Country data Kingdom of Hanover  Kingdom of Hanover  Hanover
Hope this helps. —⁠andrybak (talk) 20:47, 27 May 2020 (UTC)
It does, thank you! Lockesdonkey (talk) 22:05, 27 May 2020 (UTC)

Template-protected edit request on 4 June 2020

Remove the Hezbollah flag from this template. The flag is protected by copyright and the file used by this template is under nomination for deletion for copyvio. The fair-use version is only to be used on pages that are specifically allowed due to vandalism, therefore I see no good reason for the flag to remain in this template. - ZLEA T\C 19:03, 4 June 2020 (UTC)

 Already done by Guerillero (editing {{Country data Hezbollah}}) * Pppery * it has begun... 20:58, 4 June 2020 (UTC)
FYI I would have declined this request as premature if it did require template editor permissions - executing it would be prejudging the linked discussion on Commons, which hasn't been closed yet. * Pppery * it has begun... 21:07, 4 June 2020 (UTC)
@Pppery: It was a pretty blatant copyright violation --Guerillero | Parlez Moi 21:11, 4 June 2020 (UTC)

Custom link parameter

It'd be very nice for templates such as Template:COVID-19 pandemic data/Per capita to be able to have a parameter that allows for a custom link. Would it be possible to add that? {{u|Sdkb}}talk 10:05, 2 June 2020 (UTC)

Could you give an example of what you'd want the output to look like? Primefac (talk) 13:25, 2 June 2020 (UTC)
Primefac, yeah, so basically it would be nice to be able to use {{Flag|Netherlands|link=COVID-19 pandemic in the Netherlands}} to generate Netherlands. {{u|Sdkb}}talk 19:32, 8 June 2020 (UTC)
@Sdkb: For prefixed links there is {{Flag+link}}: {{flag+link|COVID-19 pandemic in the|Netherlands}} Netherlands (with {{flaglink}} being the equivalent for suffixes). Linking to a page whose title does not start or end with the country name can AFAIK currently only be done in {{flagg}}: {{flagg|unc|Netherlands|link=Main Page}} Netherlands. SiBr4 (talk) 21:13, 10 June 2020 (UTC)
SiBr4, thanks. Wow, there are a lot of flag templates. It might be easier if they were all included in the main documentation rather than another page. {{u|Sdkb}}talk 21:57, 10 June 2020 (UTC)
There are a ton of flag templates, most of which are listed at Wikipedia:WikiProject_Flag_Template#List (and linked in the {{flag}} /doc). They're not exactly hidden away, and I think trying to fit them all into the {{flag}} documentation would be messy and overpower the main "how to" of the template. Primefac (talk) 22:28, 10 June 2020 (UTC)

Parties

Why is this limited only to countries and states? Why don't we extend it to political parties and militias as well? --Maudslayer (talk) 11:34, 25 October 2020 (UTC)

I could be wrong, but I seem to recall seeing party flags in articles that were template-given. As to a direct answer to your question, likely because the current structure of {{flag}} would necessitate creating thousands of party-specific templates that would then need maintenance. Primefac (talk) 11:37, 25 October 2020 (UTC)

Mississippi broke

The new flag of Mississippi doesn't show using this template. Not sure how to fix. UserTwoSix (talk) 22:00, 8 November 2020 (UTC)

 Not done See Template talk:Country data Mississippi#Template-protected edit request on 4 November 2020 * Pppery * it has begun... 22:23, 8 November 2020 (UTC)

Template-protected edit request on 21 February 2021

Remove the Hainan flag from this template. The people's Republic of China does not allow provinces to have their own provincial flags. I searched the Internet and found no source of the flag. It is very likely that the flag is fictional. Ngguls (talk) 01:56, 21 February 2021 (UTC)

 Already done by you editing Template:Country data Hainan * Pppery * it has begun... 02:04, 21 February 2021 (UTC)

 You are invited to join the discussion at Wikipedia:Village pump (miscellaneous) § Flags for Bulgaria and South Korea at the Olympics. {{u|Sdkb}}talk 21:05, 26 March 2021 (UTC)

Greece is kind of glitched

When I use Greece flag 1822 it comes up with the modern flag. How do I stop this. MiniRoodey (talk) 05:16, 17 July 2021 (UTC)

Suggestion

Please add Lokot Autonomy and Slovene home guard. 86.16.81.172 (talk) 06:01, 17 July 2021 (UTC)

Template data retrieved from Wikidata

I wonder if it is possible to make this template to retrieve the flag from Wikidata directly? --Xeror (talk) 03:20, 26 August 2021 (UTC)

That sounds like a disaster waiting to happen. All you need is for someone to vandalise a flag image and suddenly we'd have porn on hundreds of pages with no obvious reason why. Primefac (talk) 11:02, 26 August 2021 (UTC)

Non-historic flag for Vietnam

It seems the flag shown for Vietnam during much of the 1800s is wrong, see Commons:Village pump#Fictional flag, real issues. –LPfi (talk) 11:33, 11 January 2022 (UTC)

So it sounds like you're suggesting that | flag alias-1863 = Royal Flag of Vietnam (1802–1885).svg and its related bits are removed from {{Country data Vietnam}}? Primefac (talk) 12:16, 11 January 2022 (UTC)

Trying to figure out what breaks South Korea

[[Image:Flag of South Korea.svg|{{#if:{{{size|}}}|{{{size}}}|22x20px}}|Flag of South Korea.svg]] [[Flag of South Korea.svg|{{#if:{{{name|}}}|{{{name}}}|{{country label alias South Korea}}}}]]

{{country flag alias South Korea}}

So it's a problem in {{country flag alias South Korea}}. Bye, Shinobu 14:16, 27 October 2006 (UTC)

Describe the problem so we know if we are still seeing it or if it got fixed. The live version of {{country_flag|South Korea}} does this:  [[{{{alias}}}|{{{name}}}]] (SEWilco 17:14, 27 October 2006 (UTC))
At the time of this writing, country_flag is showing a bordered icon of the flag with "KOR" linked to the article South Korea. (SEWilco 17:17, 27 October 2006 (UTC))

Sorry, sorry, I was just debugging happily away, so I moved straight on to template containing the problem, which I then solved and forgot about. Shinobu 10:27, 16 November 2006 (UTC)

Proposal

I propose the following code to automatically put a border around flags:

{{border|[[Image:{{
  #if: {{{variant|}}} | {{{flag alias-{{{variant}}}}}} | {{{flag alias}}}
}}|{{
  #if: {{{size|}}} | {{{size}}} | 22x20px
}}|Flag of {{{alias}}}]]|color=#aaa}} [[{{{alias}}}|{{
  #if: {{{name|}}} | {{{name}}} | {{{countryname|Earth}}} 
}}]]<noinclude>{{/doc}}</noinclude>

Alex(T|C|E) 02:19, 2 April 2007 (UTC)

I was hoping someone else would comment. Can you explain why this is a useful change? CMummert · talk 23:14, 3 April 2007 (UTC)
Oops, sorry, didn't check this page before. Some flags have borders around them just so that they look fine in this template. If the {{border}} template gets added, then this will be resolved. Except it could use a slightly darker border. — Alex(T|C|E) 20:37, 5 April 2007 (UTC)
I modified the code above. Take a look at the ukwiki version of the template that I created. That's how it would look like. — Alex(T|C|E) 20:44, 5 April 2007 (UTC)
Example of a page where the proposed template is used: uk:Центральний район. — Alex(T|C|E) 20:47, 5 April 2007 (UTC)
{{editprotected}}. There does not appear to be support for this proposal. CMummert · talk 16:51, 5 April 2007 (UTC)
I, for one do favor the revised version over the current one. --soum (0_o) 09:44, 6 April 2007 (UTC)
I made the change here, but now everything is inconsistent because not every flag template goes through this one. For example, see {{flagcountry}}. So you may want to request more edits to other templates. I don't plan to spend the time researching this myself to figure out exactly which other templates need to be changed, but if you do so I will make the changes (unless there are objections). CMummert · talk 19:17, 8 April 2007 (UTC)
Please revert this :-) The {{border}} template wraps the image in a div, and prevents inline images on the same line. For example, templates like {{USA}} are now forced into two lines (example: this should all be on  United States one line). This messes up many tables, and I'm sure quite a bit more. Carl Lindberg 20:31, 8 April 2007 (UTC)
I reverted it. I don't see the two-line effect on my browser, but apparently the border needs more testing. CMummert · talk 22:55, 8 April 2007 (UTC)
Thanks. I wasn't quite right on the div, but the template does use display:table-cell which is not consistent among browsers. In my case, I was using Safari. I don't think IE supports display:table-cell but maybe it happens to work out OK there. Carl Lindberg 00:29, 9 April 2007 (UTC)
I was using IE and everything worked fine. The template is working great on ukwiki for now. Hmm... — Alex(T|C|E) 00:39, 9 April 2007 (UTC)
Yep, I see the same problem on ukwiki (using this page to test). It does work OK in Firefox. According to this link Safari has a stricter interpretation (you can't really inline tables in regular HTML either) and IE has no support at all (but it happens to work I guess). Other browsers have other levels of support. This is the reason why many flags have bordered versions; they work without CSS trickery which has proven troublesome (unfortunately). Carl Lindberg 00:59, 9 April 2007 (UTC)

(De-indent) I'll download Konqueror and try to work on fixing this bug. — Alex(T|C|E) 02:59, 9 April 2007 (UTC)

...or not... — Alex(T|C|E) 03:01, 9 April 2007 (UTC)

Looks fine on Firefox 3.0 — Alex(T|C|E) 03:15, 9 April 2007 (UTC)

Extra noinclude

This template was broken by a recent edit. It has an extra <noinclude>. It should look like this:

<span style="white-space:nowrap"><!--

-->[[Image:{{#if:{{{variant|}}} |{{{flag alias-{{{variant}}}}}} |{{{flag alias}}} }}<!--
       -->|{{#if:{{{size|}}} |{{{size}}} |22x20px}}<!--
       -->|Flag of {{{alias}}}]] <!--
-->[[{{{alias}}}|{{#if:{{{name|}}} |{{{name}}} |{{{countryname|Earth}}} }}]]<!--

--></span><noinclude>
{{/doc}}

[[Category:Flag templates|µ]]
</noinclude>

The problem was reported at WP:VPT. Please fix as it is causing issues with Bronze Soldier of Tallinn and probably any article using {{flag}}. Mike Dillon 01:44, 5 May 2007 (UTC)

So THAT's what was causing it... It had me stomped. — Alex(U|C|E) 02:15, 5 May 2007 (UTC)
Hold on, let me test it. There might be something else wrong with it, too. — Alex(U|C|E) 02:16, 5 May 2007 (UTC)

Agreed with Mike's version. Please change ASAP. — Alex(U|C|E) 02:23, 5 May 2007 (UTC)

  • "Mea culpa!"  Many apologies for my oversight. Alex alerted me and I have now removed it; hope all is now fixed. Best wishes, David Kernow (talk) 02:32, 5 May 2007 (UTC)
    • Yep, now everything works the way it's supposed to. Thanks! — Alex(U|C|E) 02:33, 5 May 2007 (UTC)

Semi-related, my proposal for borders around flags:

<span style="white-space:nowrap"><!--

-->{{border|[[Image:{{#if:{{{variant|}}} |{{{flag alias-{{{variant}}}}}} |{{{flag alias}}} }}<!--
       -->|{{#if:{{{size|}}} |{{{size}}} |22x20px}}<!--
       -->|Flag of {{{alias}}}]]|color=#aaa}} <!--
-->[[{{{alias}}}|{{#if:{{{name|}}} |{{{name}}} |{{{countryname|Earth}}} }}]]<!--

--></span><noinclude>
{{/doc}}

[[Category:Flag templates|µ]]
</noinclude>

The &nbsp; seems to be unnecessary, I tested it on another wiki. — Alex(U|C|E) 02:49, 5 May 2007 (UTC)

It should be possible to have the wikilink vary by selected variant

I'll have code written in a little bit and put in an editprotected. --Random832 08:04, 6 May 2007 (UTC)

The idea was that you'd simply use a different Country_data_xxx template to get a different wikilink. For example, you'd use {{flag|Nazi Germany}} for World War II articles if you really want a wikilink to Nazi Germany, or {{flag|Germany|Nazi}} if you want that same flag, but still retain the link to Germany. This works because Template:Country data Germany and Template:Country data Nazi Germany are both available. I don't think it's a great idea to make these templates even more complex than they already are, when this mechanism works well enough. Andrwsc 17:15, 9 May 2007 (UTC)

Border edit by Andrewsc

{{editprotected}} I request that the edit by Andrewsc Andrwsc, adding grey borders around ALL flagicons, be undone. This change makes flagicons on literally thousands of pages ugly, and AFAIK has not been voted on anywhere. - PatrikR 20:41, 18 June 2007 (UTC)

Some discussion, albeit a small one, was held on this template's project page, Wikipedia talk:WikiProject Flag Template#Bordered flags. There was consensus for the change, as the previous alternative was irregular icon sizes and/or inconsistent border styles. Since the change, PatrikR has made the first and only objection to this change, but additional discussion is welcome. Andrwsc 20:45, 18 June 2007 (UTC)
PS: Template:country flagcountry2 and Template:country flagicon2 were edited in the same way so my request concerns those pages also. - PatrikR 20:55, 18 June 2007 (UTC)
Please figure out some consensus, preferably with the flags proect involved, and once that is reached we can edit the template if need be. Flip-flopping is the worst option. — Carl (CBM · talk) 03:22, 19 June 2007 (UTC)
Yeah, I'd prefer to keep this version up for a few days to see if there are any more comments. This is a very high-use template, so presumably more than four of us (three for, one against) have an opinion... Andrwsc 03:38, 19 June 2007 (UTC)
If you're counting me, I have no opinion, I only came to fill the editrequested tag. — Carl (CBM · talk) 04:09, 19 June 2007 (UTC)
No, I was counting Simmo676, Valentinian, and myself as the three pro-border people, and PatrikR as one against, all from the meagre discussion on the project talk page. Andrwsc 04:32, 19 June 2007 (UTC)

Requested move

The following discussion is an archived discussion of a requested move. Please do not modify it. Subsequent comments should be made in a new section on the talk page. No further edits should be made to this section.

The result of the move request was: Move. Jafeluv (talk) 02:58, 23 July 2010 (UTC)


Template:Country flag2Template:Country flag — Readability, number indicates that there are more such templates, whereas it's not like that.|Relisted user talk:billinghurst 05:27, 11 July 2010 (UTC)|Relisted. Fences&Windows 22:54, 2 July 2010 (UTC) --The Evil IP address (talk) 16:45, 17 June 2010 (UTC)

  • Neutral - my previous concern regarding the number indicating a more widely used template {{Country flag}} does not weight up the fact that this is the 104th most transcluded template, and for internal use only. Thanks for pointing it out, I supported this move too hastily without looking into it deeper. jonkerz 18:28, 7 July 2010 (UTC)
  • How is this confusing to you? It's an internal template only, not used in article markup. Who actually sees this name? A page move would thrash the job queue unnecessarily, but if consensus is that we want to do it anyway, a better choice would be Template:Flag/core. — Andrwsc (talk · contribs) 17:20, 7 July 2010 (UTC)
  • Support on grounds of naming clarity. -- Eraserhead1 <talk> 13:36, 18 July 2010 (UTC)
  • Support - can't see any major negatives (correct me if there are some); just increases clarity. Regards, Arbitrarily0 (talk) 14:24, 22 July 2010 (UTC)
The above discussion is preserved as an archive of a requested move. Please do not modify it. Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Apparently it is no big deal to add a quarter of a million tasks to the job queue from this pointless move, so in that case, why on earth wasn't a more sensible name chosen for the destination page (e.g. Template:Flag/core as I suggested)? — Andrwsc (talk · contribs) 05:28, 23 July 2010 (UTC)

Wait, what is this job queue you speak of? I don't quite understand. Arbitrarily0 (talk) 12:30, 23 July 2010 (UTC)
Help:Job queue. When the job queue is very large, such as when a quarter million pages need their "what links here" list updated because of a template rename, the Wikipedia experience suffers. Edits are not shown on Watchlist for a few minutes, etc. I still fail to see the benefit in renaming an internal template that nobody sees in article markup when the job queue gets clogged as a result. — Andrwsc (talk · contribs) 13:49, 23 July 2010 (UTC)

Comment: the same rationale could be used for renaming Template:Country flagicon2, for consistency, but that would add another ~quarter million tasks to the job queue, see Wikipedia:Database reports/Templates with the most transclusions. jonkerz 14:16, 23 July 2010 (UTC)

Size edit request

Currently, the default size is 22x20px. This causes {{flag|Canada}} to take the size of 22x11, while {{flag|Switzerland}} takes the size twice taller of 20x20. This causes table rows with Switzerland to become taller by 3 pixels under normal conditions in Mac Chrome. If there is no reason for the current dimension, we could change the default to 22x11, which would impose restriction on height quicker than a restriction on width. Restriction on width causes the problem of variance in height, as seen with the case of large Switzerland. Or, to minimize the changes (although I'm not sure if there is any reason behind the current dimensions), we could instead change the default size to 22x17, which is 3 pixels shorter. This should cause the table rows for Canada and Switzerland to equal each other. If there is good reason to keep the 22x20px default, the default size for Switzerland can be changed instead at Template:Country data Switzerland.

The real problem is that {{CHE}} uses different proportions. This causes problems because it breaks the assumption that {{countryTLA}} is a shorthand for {{flag|Country}}. Once the default size problem is resolved here, the CHE template can be reverted to its previous role of being a shorthand that behaves identically. --Bxj (talk) 05:39, 31 July 2011 (UTC)

Apparently this is the edit that changed the size to the current setting. You can't give all flags the same width because flags that are narrower would have gigantic height. Narrower flags should appear narrower. --Bxj (talk) 06:38, 3 August 2011 (UTC)


Proposals: Specify “link=” value and nowrap flag image with text

Currently the {{ flagicon}} template links the image to the article (e.g. Canada linked); however {{ flag}} (e.g. Image not linked  Canada) and {{ flagcountry}} (e.g.  Canada) don't.  Based on this discussion, I suspect that the (possible) reason it doesn't link was to avoid discussed screen reader issues; but I believe that as long as the “alt=” remains unset, screen readers should handle this correctly.  The test would be to "view" the following sentence (which has the link simulated) with a screen reader (I don't have one installed):

 This sentence contains a linked image of the flag, followed by a text link to the article for  Canada.  Please post a message below if a screen reader interprets it incorrectly such as repeating the name Canada.

Proposal #1: Update both {{ flag/core}} and {{ flagcountry/core}} to replace …|alt=|link=]]… with …|alt=|link={{{alias}}}]]…; this should link the image to the country article without affecting any other functionality.  (This change is included in the above test sentence and in all simulated examples below.)

Proposal #2(a): Currently the Flag image does not stay connected with the country name on wrap.  This would appear to be an issue going back to 2010 (See this discussion) and it still appears to be happening (See Examples of current versions… table below).  The proposal is to make the flag image, up to the &nbsp;, a nowrap.  Nowrapping only the image and the &nbsp; forces proper recognition of the &nbsp; although the country name can still wrap if it contains a space or hyphen.  Add a nowrap to the span in both {{ flag/core}} (and (depending on support for Proposal #3) {{ flagcountry/core}}), as in:
<span class="flagicon" style="white-space:nowrap;" > …
creates

Since the change is actually a change which applies to the precise segment of text covered by (what would appear to be) a unique CSS Class, an alternative (& better) potential fix would be to simply update the style sheet that defines “.flagicon” and add or change to “{ white-space:nowrap; }”, but I don't really know Wikipedia/WikiMedia's CSS and I have no idea how to figure out what, if anything, else uses class flagicon beyond {flag}, {flagicon}, and {flagcountry}, so the proposed changed would seem to be the more appropriate fix.

Proposal #2(b): Include the entire template code (Flag image and country name) in a nowrap to keep the icon connected to the country name on a single line by updating {{ flagcountry/core}} (and (depending on support for Proposal #3) {{ flag/core}}) to include:
<span style="white-space:nowrap;"><span class="flagicon … </span><noinclude>… (Note that {{nowrap}} has a problem with this so the span is req'd)
The potential down-side to making the flag image and entire country name a nowrap is that the entire country name would be forced to remain on a single line regardless of other data on the same line, which potentially creates a situation like:

but I prefer to view this as a feature rather than a problem; which leads to the following proposal.

Proposal #3: Given that there is presently very little difference between {{ flag}} and {{ flagcountry}} (See comparisons in 2nd table below), the functionality of the two should be made to have more difference since currently either template can be forced to produce identical output with the only variation being an extra parameter required in a few, fairly rare, circumstances where there is more than one variation of the country's name. 
The current difference between the two templates is that if the name= parameter is omitted, {{flag}} defaults the name to what was specified as parameter 1 to identify the flag being sought (i.e. "USA", "United States", or "United States of America"), while {{flagcountry}} defaults to name of the country hard-coded into the "Country data COUNTRYNAME" template (such as "Country data United States", which has redirects from "…US", "…USA", and "…United States of America", all of which produce the standardized country name "United States" which should perhaps officially be "United States of America" but that's another issue).  In either case, specifying the name= parameter can produce any desired output.
The two templates should be altered to serve more distinct purposes by applying the update in Proposal #2(a) (above) only to {{ flag/core}} and the update in Proposal #2(b) (also above) only to {{ flagcountry/core}}.  This would mean that {{flag}} (the shorter named function of the two) would, if necessary, wrap the country name to multiple lines with only the Flag image and the first word of the country name staying on the same line; meanwhile, {{flagcountry}} (the longer named template) would always force the Flag image and the full country name to remain on the same line.  This will undoubtedly have a minor effect on a few articles, where functionality would change slightly, particularly when viewing very wide tables in narrow browser windows at high zoom levels.  Realistically, this should have a negligable negative effect on articles overall, with only a small number of articles requiring manual edits; sooner or later an editor will stumble across those few articles where this is a problem and can (if necessary), change the {{flagcountry}} to {{flag}} if it truly causes a problem (a note can be added, especially to the flagcountry documentation, to indicate that effective such and such a date, its functionality changed in terms of wrapping and, if it's an issue, the alternate template {{flag}} should be used in its place; a sample message box appears below).  It should not cause any negative effects beyond squishing some other columns in a table or forcing the table to remain larger than the page (and thus causing the horizontal scrollbar to become active).  On the positive side, this would also mean that, in future, editors could select the more appropriate template version in order to obtain a specific desired effect and all those tables where the flag and country currently appear wrapped onto different lines will be automatically fixed by virtue of the change.

Examples of effects of proposed changes
The difference(s) between the four formats (including the present 2 conditions) are:

Current Proposed
{{flagcountry}} #2a & 3 #2(b) (& #3)
{{flag}} {{ flag}} {{ flagcountry}}
 United States of America  United States of America  United States of America  United States of America
 Canada  Canada  Canada  Canada
 People's Republic of China  People's Republic of China  People's Republic of China  People's Republic of China

(Notes: All columns are initially set to a width of 20px; Current output (cols 1 & 2) has been simulated to match output as of 2011-10-20.)

Examples of current versions with various parameters For discussion reference purposes, some examples of the live outputs from these templates are:

Live outputs
The code width= "20px" width undefined width="14em"
{{ flagicon| USA}} United States United States United States
{{ flagicon| United States}} United States United States United States
{{ flagicon| United States| name=United States of America}} United States United States United States
{{ flagicon| United States of America}} United States United States United States
{{ flag| USA}}  USA  USA  USA
{{ flag| United States}}  United States  United States  United States
{{ flag| United States of America}}  United States of America  United States of America  United States of America
{{ flag| United States of America| name=United States of America}}  United States of America  United States of America  United States of America
{{ flag| United States of America| name=Gobble-dee-gook}}  Gobble-dee-gook  Gobble-dee-gook  Gobble-dee-gook
{{ flagcountry| USA}}  United States  United States  United States
{{ flagcountry| United States}}  United States  United States  United States
{{ flagcountry| United States of America}}  United States  United States  United States
{{ flagcountry| United States of America| name=United States of America}}  United States of America  United States of America  United States of America
{{ flagcountry| United States of America| name=Gobble-dee-gook}}  Gobble-dee-gook  Gobble-dee-gook  Gobble-dee-gook

Note: Column "width undefined" varies with zoom/browser window size as table becomes larger than the window.


In summary: (assuming consensus for all proposals)

Change {{ flag/core}} to:

<span class="flagicon" style="white-space:nowrap;"><!--
  -->[[File:{{{flag alias-{{{variant}}}|{{{flag alias}}}}}}<!--
  -->|{{#if:{{{size|}}}|{{{size}}}|22x20px}}<!--
  -->|{{{border-{{{variant}}}|{{{border|border}}}}}} <!--
  -->|alt=|link={{{alias}}}]]&nbsp;<!--
  --></span><!--
-->[[{{{alias}}}|{{{name}}}]]<!--
 
--><noinclude>{{documentation}}</noinclude>

and change {{ flagcountry/core}} to:

<span style="white-space:nowrap;"><!--
  --><span class="flagicon"><!--
    -->[[File:{{{flag alias-{{{variant}}}|{{{flag alias}}}}}}<!--
    -->|{{#if:{{{size|}}}|{{{size}}}|22x20px}}<!--
    -->|{{{border-{{{variant}}}|{{{border|border}}}}}} <!--
    -->|alt=|link={{{alias}}}]]&nbsp;<!--
    --></span><!--
  -->[[{{{alias}}}|{{#if:{{{name|}}}|{{{name}}}|{{{shortname alias|{{{alias}}}}}}}}]]<!--
  --></span><!--
 
--><noinclude>{{documentation}}</noinclude>

and add a note to {{ flagcountry/doc}}, {{ flagcountry/core/doc}}, {{ flag/doc}}, and {{ flag/core/doc}} something like (and please add your improvements to this):

Please note support generally for proposal #3 really means implied support for #2(a) & (b) (as indicated); and, unless indicated otherwise, general support will be presumed for #1 as well.  Thanks and sorry it's so long!  — Who R you? Talk 10:17, 21 October 2011 (UTC)

Extra #if?

Currently the template contains {{#if:{{{size|}}}|{{{size}}}|22x20px}}. Isn't that equivalent to writing {{{size|22x20px}}} ? The latter should be the same without using a parser :) Siddhartha Ghai (talk) 11:49, 26 July 2012 (UTC)

Edit request

I'd like to change the default size in {{Country data Switzerland}} and {{Country data Vatican City}} (the line | size = {{#if:{{{size|}}}|{{{size}}}|20x16px}} from 20x16px to 23x16px. This does not affect the actual icon size since the flags of Switzerland and the Vatican are square and will remain 16px tall, but the 23px width fixes the country name alignment in Template:Flaglist where these two would currently be misaligned (see the example list in the documentation).

As a template editor I can edit the two country data templates myself. The thing is that this fully protected template contains the code {{#ifeq:{{{size}}}|20x16px|&nbsp;}}, which adds a space between the icon and the link for these two countries if used with {{flag}}. If the default size is changed in the data templates, this template needs to be changed accordingly to keep the mentioned code working.

Since there is now {{flaglist}} for cases where country names need to be aligned, it may be better to remove the extra spaces for both Switzerland/Vatican and Nepal entirely, though that probably needs some discussion. SiBr4 (talk) 22:36, 2 August 2014 (UTC)

Not done: The page's protection level and/or your user rights have changed since this request was placed. You should now be able to edit the page yourself. If you still seem to be unable to, please reopen the request with further details. @SiBr4: The cascading protection might take a little while to disappear; let me know if it still doesn't disappear after a day or so. — Mr. Stradivarius ♪ talk ♪ 19:59, 4 August 2014 (UTC)

issue raised at WT:Flag Template re:Nepal & Switzerland

Extended content

The flag names for Switzerland and Nepal seem to have extra leading spaces. This results in incorrect sorting if a list of nations is copied out of Wikipedia and sorted. Most have one leading space, but Switzerland has 2 and Nepal has 3. Can the extra leading spaces be removed? Greg Lovern (talk) 21:18, 12 October 2019 (UTC)

Yeah, I saw that at Template:Flag/core, Greglovern. It seems to be a half-assed attempt at dealing with Nepal and Switzerland's narrower widths (hardly the only ones with aspect ratios different from the norm). That's best dealt with with a small table, as in {{flag+link}}. Guarapiranga (talk) 05:31, 2 December 2019 (UTC)

Originally posted by Guarapiranga at 05:49, 2 December 2019. Fixed up by davidwr at 18:38, 12 February 2020 (UTC). davidwr/(talk)/(contribs) 18:38, 12 February 2020 (UTC)

Template-protected edit request on 24 February 2022

I wanted to edit the the Flag of Afghanistan , since Taliban dose not represent the whole country and the flag which is shown on wikipedia is not an official flag of Afghanistan , I would like to upload the correct flag.

Flag of Afghanistan

Backi07 (talk) 11:31, 24 February 2022 (UTC)

 Not done for now: please establish a consensus for this alteration before using the {{edit template-protected}} template. The flag you reference is still available as a historical flag, and there is no consensus as far as I am aware to change it from that status. Primefac (talk) 11:37, 24 February 2022 (UTC)

Refugee Nation

I propose to add the flag of the Refugee Nation, as there are flags of other nations in this template. The flag is the one by Yara Said created in 2015. It is public domain so it will not be an issue. Germenfer (talk) 10:06, 12 July 2022 (UTC)

What uses would there be for a Refugee Nation flag icon? As of now, there is no Refugee Nation as it is still just a proposal. Applying the flag to any refugees would imply that they are "Refugeeans" (I may have just coined a new demonym), which would be misleading if Refugee Nation were to become an actual nation. - ZLEA T\C 04:04, 13 July 2022 (UTC)

Sarawak Flag 1848

Edit request:

The current flag in the template for Sarawak 1848 with a blue & red cross was a historical theory proposed by WJ Chater in 1964. New evidence has been discovered that explicitly details the design of the flag by the designer James Brooke in a letter he wrote in 1849.

WJ Chater made several errors and ommissions while creating his theory.

The flag should be this one:https://upload.wikimedia.org/wikipedia/commons/9/92/Flag_of_Sarawak_%281848%29.svg [1]

Click here for the full explanation and multiple confirming sources https://en.wikipedia.org/wiki/User_talk:MatSallehSesat MatSallehSesat (talk) 06:57, 24 July 2022 (UTC)

References

  1. ^ [1]]

Template-protected edit request 11 January 2023

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I would like to propose changing the standard United Kingdom flag depicted from the 1:2 naval ratio to the 3:5 ratio variant officially used by the government on land and by civilians. Thank you. CorwenAv (talk) 14:45, 11 January 2023 (UTC)

The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.