Template talk:Flaglist

Thanks, and question about Nepal flag and standardized line height
Thanks for creating this template. I converted this list to it:
 * List of countries by incarceration rate

Now that names are aligned vertically, there remains the problem of line height standardization.

For example; in List of countries by incarceration rate, there seems to be a problem with the Nepal line height.

Note the change in line height on the Nepal line. You can tell by comparing the alignment of the row numbering column with the adjacent rows in the main table. The 2 side by side tables stop being perfectly aligned starting with Nepal. It was the same when I used flagcountry or when I used flag in the table. Look at the revisions of the list done today.

See also:
 * Template:Country data Nepal
 * Category:Country data templates with distinct default size
 * Commons:Convert tables and charts to wiki code or image files - see section: "List of countries by incarceration rate".

The problem exists also at List of countries by intentional homicide rate. --Timeshifter (talk) 10:06, 29 October 2014 (UTC)
 * As you guessed, this is due to the larger default size, which is currently 23x22px. To match the line height for Nepal with that of the other countries, set its size to 23x17px: &rarr; . The 23px width ensures the country name is still correctly aligned; the 17px height is still somewhat larger than the default 15px to compensate for the absence of a border. Due to the flag's odd aspect ratio, a flag icon of this size is rather small compared to those of other countries (🇳🇵 🇮🇳), which is why the icon size is larger by default. SiBr4 (talk) 11:08, 29 October 2014 (UTC)
 * Thanks for the fast response! fixed the problem on both lists. --Timeshifter (talk) 11:31, 29 October 2014 (UTC)
 * Looks like I no longer need the customization. See discussion here: Template talk:Country data Nepal. --Timeshifter (talk) 18:40, 12 April 2015 (UTC)

Reducing of whitespace by one pixel
I've edited your module and reduced the whitespace from 7 to 6 pixels. Now those spaces look the same in both flag & flaglist templates: Maiō T. (talk) 11:03, 4 June 2017 (UTC)
 * – flaglist ............ 6px whitespace
 * 🇺🇸 USA – flag ................ 2px whitespace + nbsp
 * – flaglist
 * 🇷🇺 RUS – flag
 * – flaglist
 * 🇺🇸 USA – flag
 * – flaglist
 * 🇷🇺 RUS – flag

I realized, the nbsp width differs according to the used font size. So I've edited that module once more. Now the span is set to 25 pixels and I've also added one space into Flaglist/core (and fixed Module:Flagg, too). Now both flag & flaglist templates use the standard spaces instead of 4px something. The following examples are with style="font-size:20pt"  – flaglist 🇺🇸 USA – flag – flaglist 🇷🇺 RUS – flag – flaglist 🇺🇸 USA – flag – flaglist 🇷🇺 RUS – flag Maiō T. (talk) 13:08, 17 June 2017 (UTC)

Template:flaglist and New Caledonia link text overlapping flags
Please see:
 * https://en.wikipedia.org/w/index.php?title=List_of_countries_by_incarceration_rate&oldid=927094380

Is there any way to move the link text to the right of the 2 flags? Right now the link text is overlapping the flags.

I have posted this also at Template talk:Country data New Caledonia. -- Timeshifter (talk) 09:32, 20 November 2019 (UTC)

Please fix Ohio
Please fix Ohio in the database. It is the only U.S. state generating some bollixed code. Compare:


 * expands to
 * expands to

I don't understand why  isn't treated as a bogus image option in both cases, but among all 50 states, only Ohio's markup doesn't have the border parameter and only Ohio's triggers the bogus image option lint error for. Will someone please clean this up? —Anomalocaris (talk) 06:54, 21 June 2021 (UTC)
 * Do you mean...
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 21:44, 21 June 2021 (UTC)
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 21:44, 21 June 2021 (UTC)
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 21:44, 21 June 2021 (UTC)


 * I got involved in this because of List of rabbit breeds, which used to use  until Guarapiranga changed those to , I'm not sure why. The images are now much too large and I think the markup should revert to  , but I was interested in the bogus image option lint error, and I determined that the markup with   works without generating lint error for every U.S. state except Ohio, where the border parameter is stripped out. Lint errors are not generated with  , only with  , but even without lint errors there is still the question of why Ohio alone doesn't have border. —Anomalocaris (talk) 07:22, 22 June 2021 (UTC)


 * I changed it to add links to country specific articles with flaglist+link. That template doesn't use the px at the end; it just assumes it's in px:  → 🇦🇺 Australia   Flag of Australia (converted).svg  Australia '"`UNIQ--templatestyles-0000000A-QINU`"' &#32; (more)
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 08:15, 22 June 2021 (UTC)

The last version of List of rabbit breeds before Guarapiranga changed the markup from  to   was, and there, the flags are well-sized. Then comes, and all of the flags are way too big, and it's been like that ever since. So there are two issues: Cheers! —Anomalocaris (talk) 00:39, 23 June 2021 (UTC)
 * 1) Ohio alone among the U.S. states doesn't have the border parameter. This should be fixed.
 * 2) Either Flaglist needs to be adjusted so that it really works without px or List of rabbit breeds needs to have the   put back in.


 * You sound upset, . You know that if you don't agree with a change, you can always revert it, right? And that all WP editors are true editors, yeah? You do know all content on WP belongs to the WMF, not to editors, no?
 * 2. flaglist doesn't; flaglist+link does (and now with px too).
 * 1. Yeah, don't know what that is, and why it only shows up for Ohio (perhaps bc its flag is not rectangular?). Or what database you're referring to. I don't see any borders in any of the flags anyway, do you?
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 00:50, 23 June 2021 (UTC)


 * Guarapiranga: I'm not upset. My original purpose here was to point out that Ohio is anomalous among the U.S. states. I said that  expands differently from all other states. That expansion, presumably, comes from some table or database that the template uses, and that table or database should be fixed so that Ohio is treated like every other state, unless there is some good reason to treat Ohio differently. Yes, I know that it's within my editing powers to revert other editors' edits. List of rabbit breeds is still messed up. The flags are too big. This could be fixed by reverting the px codes back in, or it could be fixed up by making the template really work with or without the px codes. If nobody does anything, at some point I will probably put the px codes back in List of rabbit breeds, but I wanted to wait in case someone wants to fix the template so that it really works without the px codes. Cheers! —Anomalocaris (talk) 01:04, 23 June 2021 (UTC)
 * The flags are too big.
 * — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚 ☎ 01:27, 23 June 2021 (UTC)


 * Guarapiranga: Thank you fixing the flags in List of rabbit breeds. If anyone wants to delve into it, there's still the anomalous code for Ohio. I don't know if this anomalous code for Ohio causes any actual or latent problems in Wikipedia at this point. —Anomalocaris (talk) 04:59, 23 June 2021 (UTC)

Old countries
I was trying to use this for "Socialist Republic of Romania" but it displays the short name. Trigenibinion (talk) 15:20, 6 May 2022 (UTC)

Wrapping
I checked narrowing the window. San Marino wraps below the flag.

What I was doing in a table (you may need to zoom the window to narrow it enough):

Trigenibinion (talk) 16:17, 6 May 2022 (UTC)
 * It is now implemented. I have seen a problem when a table=yes entry is followed by a line break an some other entry. Trigenibinion (talk) 20:30, 6 June 2022 (UTC)
 * The wikitext of the cell to the right must start on a new line. Trigenibinion (talk) 20:45, 6 June 2022 (UTC)

How to disambiguate
I can't find in the documentation how to disambiguate the links in this template. If you look at the table in 2022 monkeypox outbreak in New York (state) several of the county names link to disambiguation pages - when they should point to specific counties within New York (state). Any help appreciated.&mdash; Rod talk 18:29, 9 August 2022 (UTC)

Georgia (U.S. state)
Trying to get the flag and link correct in the table here: --Timeshifter (talk) 07:52, 4 December 2022 (UTC)
 * United States drug overdose death rates and totals over time

Adding custom linking and nowrap
I'm trying to add this to a table: 🇺🇸 Democrats Abroad

The rest of the table now uses Flaglist with the "table=yes"-parameter. There should be a line break between Democrats and Abroad, so nesting it in nowrap won't work.

I tried using Flaglink but it doesn't support table wrapping. And seeing as this is a table-specific problem, it seems better to change a template that already supports this.

I propose adding the link-parameter from Flaglink into this template, though it's OK to have to write "link=". And I also think it would be a good idea to implement a boolean nowrap-parameter, possibly with direction to use it sparingly. BucketOfSquirrels (talk) 14:07, 9 December 2023 (UTC)