Hi,
I want to add a new country(Kosovo). I am using Magento 2.2.5.
Thank you!
Hi @qubitzz_co
It's very easy to add new country in Magento just follow the steps given below and you are done with it.
Step1: Open lib/zend/locale/data/en.xml
Step2: Locate territories tag in this file
Step3: copy one of the 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
this new country should be selected in list of allowed countries.
------------------------------------------------
If you've found one of my answers useful, please give"Kudos" or "Accept as Solution"
There is no zend folder inside lib folder.
Follow below steps:
Step1: Open vendor\magento\zendframework1\library\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
Cheers
Hi @qubitzz_co
This is the right path
M2 File path : Open vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml,
M1 File path : Open lib/zend/locale/data/en.xml
Hello @qubitzz_co,
Please add below node in this file location vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml
<language type="ksv">Kosovo</language>
--
If my answer is useful, please Accept as Solution & give Kudos
I am working on Magento 2.3.5 I also need to add new country. There are many reference having same solution. But this solution doesn't work. Don't any one know right solution?