Template talk:Flag link

message: Please help For some reason  works, but  does not, even though Template:Country data People's Republic of China exists. I'm not adept at this, so if someone could please fix it, I would appreciate it. -Justin (koavf)·T·C·M 18:14, 9 January 2008 (UTC)
replies: text: I presume you are referring to flaglink, not flagicon.  I think you need to understand how this template works before making mass edits like that.   creates a wikilink by appending a string to the country name.  Therefore, your edit would have changed the wikilink from China at the 2007 World Championships in Athletics to People's Republic of China at the 2007 World Championships in Athletics.  Now in this specific instance, the former target article doesn't exist, so no harm would have been done, but in many sporting events, just "China" is used for the PRC.  (In contrast, the Republic of China is called "Chinese Taipei" in most of those same events).  So please look at the context of your AWB edits and skip over sport related ones.  Thanks, — Andrwsc (talk · contribs) 18:39, 9 January 2008 (UTC)
thread_title: PR China broken

message: Currently "" generates " India", which contains a flag of India that links to the India article; the flag has no alt text. This use of a flag doesn't follow the WP:ALT guideline for alt text, which says that every functional image must have alt text. In this case the image is functional only in that it links to India; other than that, it is purely decorative, since it merely repeats what's in the adjacent text. (Purely decorative images don't need alt text, as per WP:ALT).
The problem with this approach is that a visually impaired reader, who is using a screen reader, will hear something like "India link India link". The first "India" links to the India article; the second links to the India national cricket team article. This is pretty confusing. Even for a sighted reader the link to India is pretty confusing.
The simplest way to fix this problem for accessibility is to remove the link to India, so that "" generates " India" instead. This flag doesn't link to anything, and a screen reader will say just "India link", which is much clearer. This is what has been done for other flag templates; please see Wikipedia talk:WikiProject Flag Template #Fix for accessibility disaster. I've done this in the sandbox and have tested the result; please see Template:Cr/testcases. Can you please install the sandbox patch? Thanks. Eubulides (talk) 06:03, 14 August 2009 (UTC)
replies: text: When I crafted the various national team templates in their current form, I thought there was value in having both a link to the respective national team, and a link to the article for the nation itself.  I guess not...?  — Andrwsc (talk · contribs) 06:49, 14 August 2009 (UTC)
replies: text: We want high-value links. Country links will be of little use, and even if readers wanted to get to them, they can always click from the high-value cricket article. Dabomb87 (talk) 14:13, 14 August 2009 (UTC)
thread_title:  Accessibility improvement for visually impaired readers 

message: Is there any way I can make (just) the flag, link to somewhere else like for example:<BR>
<BR>
but instead of linking to United States, I want it to link to Billboard 200 because thats the ranking of highest selling albums in the United States. — QwertLuis (talk · contribs)
:Not with this template.  Just use MediaWiki image syntax, I suppose. — Andrwsc (talk · contribs) 22:53, 13 February 2010 (UTC)
thread_title: Other Links

message: I have an idea how to align texts after the flagicon.
current result	note
              	default
              	default: flagicon plus one " "
              	default
              	default: flagicon plus one " "
              	default
              	default: flagicon plus two " "s
              	default
desired result	note
              	
‍       	added 3px space using , then default
              	
‍       	‍"
              	
‍       	‍"
              	
As you see, the 16px wide  flagicon needs in total 7px space to align with the regular 23px flagicons. And the tiny  flagicon needs 11px, in the upper right table it is shown as 3px space plus 8px (or two nbsp's).
Other options for Flag of Nepal aligning:
‍‍ = 
‍‍ = 
‍‍ = 
‍‍ = 
‍‍ = 
‍‍ =  — 6px space on the left and 5px space on the right — this is my favourite
‍‍ = 
‍‍ = 
‍‍ = 
‍‍ = 
So, please edit this template with  for SUI & VAT and with . Thanks.
Maiō T. (talk) 21:45, 1 August 2013 (UTC)
replies: text: Best for you to edit the sandbox version - Template:Flaglink/core/sandbox and test it, then we can move it. Sandbox is now the same as the main template.  Ronhjones  (Talk) 23:49, 1 August 2013 (UTC)

text: I fixed a bug in the sandbox which caused unmatched  tags if the alias parameter wasn't present. I've also made it easier to see how the logic works. Maiō T., could you give me a link to the village pump discussion that you mentioned? I thought that the TBD icon looked a little intrusive, but if there was a consensus for it then I'll put it back in. — Mr. Stradivarius ♪ talk ♪ 05:18, 5 August 2013 (UTC)

text: Also, to put the spacing before the icon, all you have to do is add another #if statement before the icon starts and put the spacing there. Have a try at doing that and see if it works for you. — Mr. Stradivarius ♪ talk ♪ 05:20, 5 August 2013 (UTC)
replies: text:  I've deactivated the request for now. Please reactivate it when you respond. — Mr. Stradivarius ♪ talk ♪ 05:08, 7 August 2013 (UTC)

text: The correct solution to the "ugly  code", of couse, is not to use templates such as  without any parameters.  The template documentation clearly states that the first parameter is mandatory.  Garbage in, garbage out.  Forcing this template to emit something like TO BE DECIDED is not generalized for all the situations where the national team templates are mistakenly called without any parameters.  — Andrwsc (talk · contribs) 17:19, 8 August 2013 (UTC)
replies: text: What if I left the first parameter intentionally blank – the result would be TO BE DECIDED.Or there is also the other option: add #if into the flaglink-template – If the first parameter is entered as TBD, then display TO BE DECIDED.Maiō T. (talk) 17:59, 8 August 2013 (UTC)
replies: text: Then you are intentionally misusing the template as it is documented.  And as I said already:  It may be appropriate text for the specific instance on 2013 FIBA Europe Under-16 Championship for Women, for example, but likely not appropriate for every instance where national team templates are used.  And to be honest, I think it's a bit ridiculous to have large sections of the FIBA article filled with empty tables.  What purpose does the empty "Final standings" table serve at this point?  It seems like you want to have as much wiki markup "ready" to be filled in as the tournament progresses, but that makes the article look silly in the meantime.  How much benefit is there in typing  placeholders in advance, rather than typing  when updating the article after a completed game? I object to adding complexity (i.e. a parser function) to this template simply to accomodate that specific mis-use of  et. al. — Andrwsc (talk · contribs) 20:39, 8 August 2013 (UTC)
replies: text: I was inspired by Snooker.org – see this external link. What now? Shall I delete all of the scheduled matches until they will be finished?Maiō T. (talk) 23:16, 8 August 2013 (UTC)
replies: text: Comment out the block of unused wiki markup until needed.  Trivially easy edit each time, by just changing the endpoints of the comment block.  — Andrwsc (talk · contribs) 06:53, 9 August 2013 (UTC)

text: Um, no.  I never said that.  Please do not assume what I think.  I happen to think that adding a dozen parser functions to this template is a terrible, terrible solution to the problem you perceive.  The whole point of the current flag template system implementation was that per-flag formatting overrides (i.e. suppress border display, display a different link name for national teams, etc.) are distributed across the per-country templates instead of coded with a large #switch statement (or worse, as a chain of cascading #ifeq statements) in one location.  A superior method of adding spacing to the left and/or right of each icon image would be to add markup only to the country templates that need it (e.g. something like spacing-left = 2) and the formatting templates (like this one) would use those parameters as appropriate.  I would not oppose a change like that, but I do oppose your sandbox version being used permanently here.  — Andrwsc (talk · contribs) 00:29, 11 August 2013 (UTC)
replies: text:  Not done: It seems clear enough to me that there's no consensus to make this edit at this time. Maiō T., I suggest you have a look at Andrwsc's idea of adding code to the country templates instead. Let me know if you get into any difficulties. Best — Mr. Stradivarius ♪ talk ♪ 03:12, 11 August 2013 (UTC)
replies: text: Andrwsc, first, thank you for your tip (Category:country data templates), because I found there . That's exactly I needed last week, remember? Now I can use e.g.  or , can't I ???Secondly, your idea to edit tens of country-data articles is terrible, too. Particularly if the edit damages a something else. See these s:Switzerland, Nepal and Vatican big flagicons are disrupted because of their  edits.Maiō T. (talk) 11:55, 11 August 2013 (UTC)
replies: text: Everything was working well until ill-conceived edits like this were made, without taking into account all the intracacies of the flag template system implementation.  Take a look at how image borders are handled, by using a different template parameter (border =) instead of messing around with an existing parameter.  — Andrwsc (talk · contribs) 18:06, 11 August 2013 (UTC)
replies: text: A perfect idea! Let's add this parameter "specialdimensions =" into the countrydata templates in question. And into  too.Maiō T. (talk) 19:23, 11 August 2013 (UTC)
thread_title:  Edit request on 1 August 2013 

message: Notice the names of Switzerland, Nepal and the Vatican don't line up with others. The (proper) solution is to use  as attribute of the flag span, as in the sandbox. — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 05:33, 6 June 2021 (UTC)
thread_title:  Ad hoc insertions of spaces for predefined flags don't actually work 

message: Switzerland and Vatican City currently only include previously used flags in this template. Currently  uses  and  uses . Please update the template to include those 2 flags or to recognise square flags in general so they have an extra space in templates such as . Aris Odi ❯❯❯ talk 07:10, 3 September 2023 (UTC)
replies: text: * Pppery * it has begun... 21:34, 4 September 2023 (UTC)
thread_title:  Template-protected edit request on 3 September 2023