cancel
Showing results for 
Search instead for 
Did you mean: 

How to add new country on Magento 2.1.1

How to add new country on Magento 2.1.1

Hello. I'm using Magento 2.1.1 and I need to add new country in the list of country.

 

Such as existing : United Kingdom, United State,

 

and I need to add for example : My Country, Your Country, His Country, Her Country, etc.

 

How to add ?

 

Thank you so much.

Tags (2)
5 REPLIES

Re: How to add new country on Magento 2.1.1

Hello Jurpro,

 

What you are looking to do I believe will need to be done by modifying the database tables directly. Unless of course there is a plugin available to do it for you which there doesn't seem to be for Magento 2.

 

With that in mind you will also need the proper ISO code for whichever country/region you are adding

 

I do know for region's you will use the following 2 tables:-

 

directory_country_region
directory_country_region_name

 

Just trying to get you on the right track! Unfortunately I can not give you any further insight into this as I currently do not have a Magento 2 test-bed ready.

 

Leslie B.
Aspiration Hosting - Magento 1 & 2 Optimized Cloud Hosting
Problem solved? Click Accept as Solution!

Re: How to add new country on Magento 2.1.1

Thanks for reply. I know that you wrote is for add state / province. But I need to add new country in the list existing country.

 

Any body could help?

 

Thank you

Re: How to add new country on Magento 2.1.1

Hello all. Anyone can assist me?

 

Smiley Happy

Re: How to add new country on Magento 2.1.1

Hi,

Does anyone has an idea about this question?

Re: How to add new country on Magento 2.1.1

Step1: Open lib/zend/locale/data/en.xml

Step2: Locate territories tag in this file

Step3: copy one of territory tags for the syntax and paste it within the territories tag

Step4: hard part here is to add country code in this file as might not be able to find a unique one, so it’s upto you.

Step5: Save this file

Step6: Open table name directory_country

Step7: It has predefined syntax follow then same and create a new row and enter the same country code as entered in the en.xml file in 3 columns

 Step8: Refresh the site’s cache.

Step9: Admin > Configuration > General