Install
Works with Drupal: 7.xUsing Composer to manage Drupal site dependencies
Downloads
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.