Using Country Icons

mrfelton - April 16, 2009 - 07:50
Project:Language Icons
Version:6.x-2.x-dev
Component:Icon collection
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

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?

#1

Freso - April 16, 2009 - 17:57
Title:Country Icons» Integrating 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. :)

#2

Jose Reyero - April 16, 2009 - 18:38

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.

#3

mrfelton - April 16, 2009 - 19:06

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.

#4

Freso - April 16, 2009 - 20:03
Title:Integrating with Country Icons» Using Country Icons
Component:Miscellaneous» Icon collection
Category:support request» feature request

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.

#5

mrfelton - April 17, 2009 - 12:49

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.

 
 

Drupal is a registered trademark of Dries Buytaert.