Install

Works with Drupal: 7.x

Using Composer to manage Drupal site dependencies

Downloads

Download countries-7.x-2.0.tar.gztar.gz 51.17 KB
MD5: cf0104a6511b2bf14be4fb2a9fc765c5
SHA-1: 74ff47b9672f24b2cf83360b14c907bf4b1935c8
SHA-256: dd43bf69523841436e425009d25418ba19eb3cb4dc560d335d1238331e8ec8cf
Download countries-7.x-2.0.zipzip 63.04 KB
MD5: 4f03e16a457e25c90acda94e726ad7f0
SHA-1: a6277a3ede94080351d29ec8995361c158c012bc
SHA-256: 859ca72f938a80dfa4fe32db8dc39c7d1d1bf5adaa0f757ea2c3a7448209c411

Release notes

Important changes from the 7.x-1.x branch:

Entity API is now a requirement.

After the decision to make countries fieldable entities, this was almost inevitable. This provides a lot better integration and advantages with a number of other contrib modules that use this API.

Other API changes of importance:

countries_get_countries() could throw an exception. [API CHANGE]
If not a core property and a test country does not have this property either, this throws an exception.
Deprecated countries_get_country() [API CHANGE]
This is replaced with country_load(). All calls to countries_get_country() have a watchdog entry warning about the deprecated function and returns country_load() results.
String changes
There have been a number of changes and more consistency has been added to make this process easier.
Country field internal data array
This is normalised so that the safe_value parameter is used instead of the safe parameter.

New features

I haven't tracked these, but there have a few.

I18n integration
There is a new i18n sensitive country widget.
Continent countries widget
This provides a widget that allows users to filter the long country list based on the select list values for continent.
Continent formatter options
Countries list sort
Renaming Åland Islands means that the sort is not working, as this is listed last on the list. Custom sort should resolve sorting in most Latin based languages.
Validation of names and official names are tightened
Normalised property getter
Much easier to obtain country data, even if the source data type is not known.
Country icon support (both branches)
There are much better formatter options that allow you to map any core country field with the country icon set of your choosing.
Better integration
Entity API, ApacheSolr, Migrate, Feeds directly and probably many more due to the Entity API base, including Rules, ....

Country name changes

The name column is fully in sync with the ISO standard. As always, which properties to import are optional and can be customised.

These are the name changes from core Drupal 7 list.

  • Aland Islands to Åland Islands
  • Bolivia to Bolivia, Plurinational State of
  • Brunei to Brunei Darussalam
  • Congo (Brazzaville) to Congo
  • Congo (Kinshasa) to Congo, The Democratic Republic of the
  • Falkland Islands to Falkland Islands (Malvinas)
  • Iran to Iran, Islamic Republic of
  • Ivory Coast to Côte d'Ivoire
  • Laos to Lao People's Democratic Republic
  • Macao S.A.R., China to Macao
  • Macedonia to Macedonia, The Former Yugoslav Republic of
  • Micronesia to Micronesia, Federated States of
  • Moldova to Moldova, Republic of
  • North Korea to Korea, Democratic People's Republic of
  • Palestinian Territory to Palestinian Territory, Occupied
  • Reunion to Réunion
  • Russia to Russian Federation
  • Saint Helena to Saint Helena, Ascension and Tristan da Cunha
  • South Korea to Korea, Republic of
  • Taiwan to Taiwan, Province of China
  • Tanzania to Tanzania, United Republic of
  • U.S. Virgin Islands to Virgin Islands, U.S.
  • Vatican to Holy See (Vatican City State)
  • Venezuela to Venezuela, Bolivarian Republic of
  • Vietnam to Viet Nam
  • British Virgin Islands to Virgin Islands, British

Bug fixes

The module has been fairly stable, scan of the issue queue only really picked up:

#1557776: Incorrectly using hook_hook_info().
Input fixes of disabled countries (discovered after AN was flagged as disable and the 3 new countries added (well, two additions, the third was already in the core listing). Validation was also added, as users could potentially use their own data for imports and invalid translations could cause issues.

Created by: Alan D.
Created on: 4 May 2012 at 12:40 UTC
Last updated: 11 Jun 2014 at 23:18 UTC
New features
Bug fixes

Other releases