Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I just started a new project where I aim to provide country Icons and an API for displaying them. However, it's just been pointed out to me that it may be possible to integrate this feature into this project... Please see http://drupal.org/node/434516 for details... What are your thoughts?
Comments
Comment #1
Freso CreditAttribution: Freso commentedI think it'd be great to take out the actual icon files from Language Icons, and instead have Language Icons be a module pulling in the icons from "Country Icons" and using them.
I'm trying to poke you on IRC to ask you more about your module. :)
Comment #2
Jose Reyero CreditAttribution: Jose Reyero commentedHey I think it would be great to have some way to share icons across modules, or shared icon collections, APIs, etc. This one may be interesting too, http://drupal.org/project/icon
However, about language / country icons, we have to remember that besides some important overlap, they're not the same, and language codes are not country codes either.
That said it would be great if this languageicons module were only a wrapper that would add icons from some other collection to language links. Or alternatively that this was only an icon collection that could be used with some other API/module.
Comment #3
mrfelton CreditAttribution: mrfelton commentedMy idea was simply to wrap the icons up in a module and provide an api to access them (aka Country Icons). In my eyes, the API would provide lookups by ISO2 and ISO3 country name. If Language Icons was to pull it's icons from CountryIcons too, then there would need to be some kind of language_code -> country_code lookup - but I'm not too sure where this should live. Perhaps that is a feature for countries_api?
Ideally, countryicons would have sub packages containing different icon sets (style, size etc) - but actually, the only free icons I know of are the famfamfam ones. Though, I'm sure there must be others laying about somewhere.
Comment #4
Freso CreditAttribution: Freso commentedI think that either Language Icons or Country Icons should provide the mapping. Probably Language Icons.
As for GPL'able icon sets, there are the ones already used by Language Icons and a few in the queue waiting for #319966: Add flag icon theme selector.
Comment #5
mrfelton CreditAttribution: mrfelton commentedI've just made an initial commit of the CountryIcons module if you want to check it out... currently there are 4 functions:
countryicons_get_iconsets
countryicons_get_iconset
countryicons_get_icon_path
theme_countryicons_icon
you can use
countryicons_get_iconsets
orcountryicons_get_iconset
to get details of available iconsets, which you can then pass tocountryicons_get_icon_path
ortheme_countryicons_icon
to get the actual icon.I took some ideas from the patch at #319966: Add flag icon theme selector to allow multiple icon sets to be supported. There is currently only one set provided (famfamfam), but I did manage to find several others, although I don't think their licensing terms would allow me to include them in the CVS:
eg
What do think? My gut says that since they require you to pay for them on commercial sites, and we can't guarantee that they won't be used on commercial sites, tat we can't include them.
Comment #6
klonosSubscribing...
Comment #7
Freso CreditAttribution: Freso commentedExcellent work! I'll be looking forward to try and integrate it. =)
Also, re: licensing:
Unless the icons (or their sources) are specifically released under the GPL or under the Public Domain, they can't be re-released under the GPL. Most of the flag graphics on Wikipedia are in the public domain, which means there's no issue making an icon of them and releasing that icon under the GPL.
Comment #8
droshani CreditAttribution: droshani commentedYou might find this hard as some languages belong to nation without state of their own, such as Basque and Kurdish as well as many African languages.
I have made some suggestion here http://drupal.org/node/613038
Some other solution around this that your module allow for creating costume language presentation, such as
Name of the language [Basque] Icon to represent [user can upload this and crop to size]
Comment #9
Freso CreditAttribution: Freso commentedAs it looks now, this probably won't be done for 6.x-2.x (unless someone is extremely quick and comes up with something awesome within a very short time), but that's not to say I have ditched it. Quite the contrary, I'll probably be looking into this for the 7.x-2.x version, once 6.x-2.0 and 7.x-1.0 have been released.
Comment #10
pfrenssenDrupal 6 is no longer supported. If anyone is still interested in this, feel free to reopen and update the version.