How can I add a new country in country dropdown box wich is rendering from address module?
This is very urgent, can someone help me out from here

Comments

AlexisWilke’s picture

The definition of a country is below the following folder:

addresses/countries/

I suggest you copy an existing country to yours and edit the name, address, etc. directly in there.

You cannot add a new country using the interface.

Thank you.
Alexis Wilke

P.S. We'll appreciate a copy of you addition! 8-)

Praveen Sharma’s picture

Go to the addresses.inc file in addresses module under _addresses_country_get function and add country key and country name. eg.

$countries=array('yourcountrykey'=>t('yourcountryname'));

After adding this go to _addresses_country_get_code3 function and add yourcountrycode key and ISO name eg.

$countries=array('yourcountrykey'=>'country iso code');

After making these changes in addresses.inc file create one file "yourcountrykey.inc" in countries directory. You can mention the list of states under addresses_province_list_yourcountrykey function eg.
In "yourcountrykey.inc" file

function addresses_province_list_yourcountrykey(){
   return array('stateuniquekeyfordatabase'=>t('Province name'));
}