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.
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:-
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.
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?
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