Template talk:Flagicon

From OpenStreetMap Wiki
Jump to: navigation, search

22px png to svg

I suggest to change the template from *_22px.png to *.svg. Otherwise we'd have to import/convert a lot of files since there are up to now just 45 Miniflags at the wiki. As we are now able to use now media from Wikimedia Commons it would be easiest to use [[Image:Flag_of_Ukraine.svg|border|22px|]]: Actually I am missing the ukrainian flag: Flag of Ukraine.svg

Sounds like a good idea. Unless trendering the svg files to bitmaps causes performance problems (which I don't expect), we should implement your suggestion. --Tordanik 14:11, 20 April 2009 (UTC)
Good. Whom of the we - or should we ask for another opinion? --Malenki 20:09, 20 April 2009 (UTC)
Just do it. (It was your idea, after all.) This template has only a moderate amount of inclusions, so nothing bad is likely to happen. --Tordanik 21:05, 20 April 2009 (UTC)
Done. After changing I realised beside some missing flags (which was to expect and what I will fix) that there is not really a "Flag of Korea" but there has to be differenced between North Korea and South Korea. I hope people who know in which page of the wiki which of both Korea is meant will fix this.


Could an optional "the" parameter be added? Or could values of "United States" and "Philippines" be specifically checked? Their flags aren't displayed at Tag:boundary=administrative (and other locations).

Ireland named incorrectly

When using the Ireland flagicon, it gives the name as Ireland (Rép. of) whereas the correct name is simply Ireland. Can this be fixed? I would do it myself by I cant see how to edit template pages

The name is actually defined in Template:CountryNameLang which is a really scary piece of code. I see the string there but I was not able to see in which case this one is supposed to be displayed instead of simply "Ireland" or "Éire" which are in the same line of code. --Lyx (talk) 23:43, 9 February 2018 (UTC)
OK I removed the disambiguation suffix displayed : Ireland, it was not incorrect, the real full name of Ireland is "the Republic of Ireland", where "Ireland" itself designates the full geeographical island (and historic/cultural country).
The code is not so complex, but it handles the mapping of several aliases in English to a name to return (after "="), translated in one or several supported languages. Additionally it takes care of returning alternate forms for "of XXX", and "in XXX" where should use a genetive or locative (in some target languages), or insert an article.
Initially the code was simpler but it evolved to take care of more tricky cases
May be this will be fixed to use several subtemplates, but performance and expansion cost is significant on some pages that display many flags, and using a single template better uses the cachability of templates expansion in MediaWiki. If subtemplates are used, it will be to split CountryLang in separate part for each target language to display, if we need to support more translations. — Verdy_p (talk) 06:35, 10 February 2018 (UTC)
Thank you for fixing and for the explanation. --Lyx (talk) 10:04, 10 February 2018 (UTC)