Adding of international calling codes
merchantx - July 13, 2008 - 07:50
| Project: | Country codes API |
| Version: | 6.x-1.1-alpha1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | ngmaloney |
| Status: | postponed |
Jump to:
Description
using http://www.whatcountrycode.com/download/country_codes_pipe.txt
taken from http://www.whatcountrycode.com/data.php

#1
I'm moving this issue over here from the ip2cc queue (http://drupal.org/project/ip2cc), another module that I maintain. I think this functionality is possibly more suited to the country codes API. Thoughts??
#2
It is possible. Part of the reason for migrating the module to a database was to support additional features such as this. I'll work on a patch to add this data.
#3
I think that if we do add this data, it should be as a submodule, since most people using the api will not want the additional functional, or overhead.
#4
FYI: I've just contributed the world_phone module, which includes exactly this functionality: a mapping from ISO 3166 codes to international telephone calling codes. The list I used is derived from the official ITU calling code standards, and it is actually a bit longer than the lists linked in the original issue, above -- it includes, for example, the four-digit telephone codes, starting with 1, that are used by various small nations in the Western Hemisphere.
(Of course, at the moment world_phone also includes its very own private implementation of country_api. ;) That's because country_api didn't exist when I started writing world_phone. My plan is for future releases of world_phone to rely on country_api for short names instead of maintaining redundant versions of that API.)
If you would like to international telephone codes to country_api I can rip that code out of world_phone module and submit it as a patch. Then I'll eventually be able to derive the phone codes from country_api as well. Alternatively, we can encourage people who need to look up telephone codes to simply download world_phone and use its API. Thoughts?