Hi,
On the main projectpage it is stated that this module "Typical usage would be converting a country name to its ISO2 (or ISO3) country code". Could you please tell me with code how I can do this using these api's?
Next to this I have the countryname in my own country format, dutch, so sometimes "holland" or "Nederland", or "Netherlands".
Is there some code to say in pseudocode:
1) First alter the countryname to it's english alterego, say something like "holland" or "Nederland" will become "The Netherlands".
2) Then convert the countryname to countrycode. "The Netherlands" becomes "NL".
Thanks a lot in advance for helping me!
Greetings, Martijn
Comments
Comment #1
summit commentedI found this piece of code:
may be this is usable the other way around with converting?
Comment #2
mrfelton commentedYou may want to read the API documentation:
http://www.kirkdesigns.co.uk/docs/drupal-country-codes-api-module/countr...
location_get_iso3166_list() is nothing todo with this module, it is a function provided by the location module.
Comment #3
summit commentedHi,
I did, but couldn;t find a api to use to get from countryname to countrycode.
Please assist.
Thanks a lot in advance!
Greetings, Martijn
Comment #4
mrfelton commentedThere is currently no function for this, however you could run your own query to do this... something like:
Comment #5
summit commentedHi, closing this issue, while this needs to work, right? whole issue with also 1) on http://drupal.org/node/427502#comment-1690314
Comment #6
rooby commentedSee #427502-7: How to get frrom countryname to country-id and then translate it in my language (Dutch)? for details. on how to do this.