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 can always get that from the geoip.inc file but it'd be sweet if this module had a geoip_get_country_list() that was a big array like:
array(
'AF' => 'Afghanistan',
'AL' => 'Albania',
// etc.
)
Comments
Comment #1
webchickActually, in looking at how Ad GeoIP does this, I'm not sure it makes sense for this module. Best to keep to one thing and do it well.
Comment #2
rickvug CreditAttribution: rickvug commentedI could see this being helpful.
Comment #3
roball CreditAttribution: roball commentedIf you have the Location module installed, it provides the location_country_name() function to resolve the 2-digit-country code into the country name like this:
The Country codes API module also offers a way for this resolution.
Comment #4
klonos...subscribing
Comment #5
drewish CreditAttribution: drewish commentedDo you mean geoip_country_values()? It returns the array of country code => name mappings defined in geoip.values.inc.