I want to know how can I add a new nation into the list used e.g. into onepage.


  • you mean to add a new country?
    – Nidheesh
    Commented Sep 29, 2016 at 15:15
  • Yes, how can I do this? Commented Sep 30, 2016 at 5:44

1 Answer 1


This is rather easy, but does require a core hack. So, be aware of that.

First of all, you'll need to update the file lib/Zend/Locale/Data/en.xml. That file contains all the territories. If you search for <territory you should be able to find them all the territories. You will need to add your own line here, like this:

<territory type="ISO2">My Country</territory>

ISO2 should contain the ISO2 code of the country. For example for the USA it's US. Remember this value, because we'll need it later on. And of course "My Country" is the name of the country you want to add.

After this, you'll need to add a row to the database table directory_country. Here you'll need to add a new row, where country_id and iso2_code should be the same as the ISO code that you entered in the file before. The iso3_code should be the official ISO3 code for the country, so you might have to look this up.

After adding the row to the table, you might need to refresh the cache. And when everything works as expected, you should see your new country when you go to the admin and go to System > Congifuration > General and check a selectbox for countries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.