Template talk:Flag link
Page contents not supported in other languages.
Flag Template | ||||
|
Please help For some reason {{flagicon|China}} works, but {{flagicon|People's Republic of China}} 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)[reply]
flaglink
, not flagicon
. I think you need to understand how this template works before making mass edits like that. {{flaglink}}
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)[reply]{{editprotected}}
Currently "{{cr|India}}" 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 "{{cr|India}}" 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)[reply]
Is there any way I can make (just) the flag, link to somewhere else like for example:
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)
I have an idea how to align texts after the flagicon.
desired result | note |
---|---|
France | |
Switzerland | added 3px space using {{pxsp}}, then default |
Russia | |
Vatican City | " |
China | |
Nepal | " |
Italy |
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:
= {{pxsp|1}}{{flagicon|NEP}}{{pxsp|10}}
= {{pxsp|2}}{{flagicon|NEP}}{{pxsp|9}}
= {{pxsp|3}}{{flagicon|NEP}}{{pxsp|8}}
= {{pxsp|4}}{{flagicon|NEP}}{{pxsp|7}}
= {{pxsp|5}}{{flagicon|NEP}}{{pxsp|6}}
= {{pxsp|6}}{{flagicon|NEP}}{{pxsp|5}} — 6px space on the left and 5px space on the right — this is my favourite
= {{pxsp|7}}{{flagicon|NEP}}{{pxsp|4}}
= {{pxsp|8}}{{flagicon|NEP}}{{pxsp|3}}
= {{pxsp|9}}{{flagicon|NEP}}{{pxsp|2}}
= {{pxsp|10}}{{flagicon|NEP}}{{pxsp|1}}
So, please edit this template with {{pxsp|3}} for SUI & VAT and with {{pxsp|6}}{{flagicon|NEP}}{{pxsp|5}}. Thanks.
Maiō T. (talk) 21:45, 1 August 2013 (UTC)[reply]
@Ronhjones: Done! The sandbox version is ready to become the regular one. Unfortunately, I do not know how to insert the {{pxsp}}'s to the left of the flagicon, so I have inserted them on the right side. Nevermind, this looks good too.
code | gives |
---|---|
{{fb/sandbox|FRA}} | France |
{{fb/sandbox|SUI}} | Switzerland |
{{fb/sandbox|RUS}} | Russia |
{{fb/sandbox|VAT}} | Vatican City |
{{fb/sandbox|CHN}} | China |
{{fb/sandbox|NEP}} | Nepal |
{{fb/sandbox|ITA}} | Italy |
{{fb/sandbox|}} | |
{{fb/sandbox|USA}} | United States |
I killed two birds with one stone. I also added the TBD-icon in accordance with the last week discussion at Village pump (technical).
And please edit the template {{flagright/core}} with the same style, too. I just created a {{flagright/core/sandbox}}. Thanks.
Maiō T. (talk) 12:25, 2 August 2013 (UTC)[reply]
<span>...</span>
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)[reply]
@Mr. Stradivarius: I'm back. In my last contribution I wanted to kill two birds with one stone, but the birds both flew away :–D . Therefore, this time I write it separately.
1
In the village pump discussion that I mentioned, we discussed the replacement of the ugly [[ {{{altlink}}}|]] code with something nicer, for example "flag of none" or " " or "TBD". So I inserted the {{TBD icon}} into the sandbox. In fact you're right, the black&yellow combination is quite intrusive. Now I propose this neutral solution: TO BE DECIDED, because anything is better than the current result.
LINK
Maiō T. (talk) 16:36, 8 August 2013 (UTC)[reply]
TO BE DECIDED is not generalized for all the situations where the national team templates are mistakenly called without any parameters.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
{{bkw|}}
placeholders in advance, rather than typing {{bkw|XYZ}}
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 {{bkw}} et. al. — Andrwsc (talk · contribs) 20:39, 8 August 2013 (UTC)[reply]2
My another idea was an aligning.
@Mr. Stradivarius: Now it's really ready. The sandbox template is edited and tested. Everybody must agree, the second column looks nicer. Even administrator Andrwsc.
Maiō T. (talk) 19:04, 10 August 2013 (UTC)[reply]
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)[reply]border =
) instead of messing around with an existing parameter. — Andrwsc (talk · contribs) 18:06, 11 August 2013 (UTC)[reply]Notice the names of Switzerland, Nepal and the Vatican don't line up with others. The (proper) solution is to use style="display:inline-block;width:25px" as attribute of the flag span, as in the sandbox. — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 05:33, 6 June 2021 (UTC)[reply]
Switzerland and Vatican City currently only include previously used flags in this template. Currently {{Country data Switzerland}} uses File:Flag of Switzerland (Pantone).svg and {{Country data Vatican City}} uses File:Flag of the Vatican City (2023–present).svg. 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 {{flagu}}. Aris Odi ❯❯❯ talk 07:10, 3 September 2023 (UTC)[reply]