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

Title:Country IconsIntegrating with Country Icons

I 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. :)

Hey 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.

My 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.

Title:Integrating with Country IconsUsing Country Icons
Component:Miscellaneous» Icon collection
Category:support» feature

I 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.

I'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 or countryicons_get_iconset to get details of available iconsets, which you can then pass to countryicons_get_icon_path or theme_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

All the icons can be free used for non-commercial, but part of them copyright belongs original author. If you want to use icons for commercial purposes, you have to pay for obtain the author's License agreement.

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.

Subscribing...

Excellent 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.

You 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]

Status:Active» Postponed

As 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.