cancel
Showing results for 
Search instead for 
Did you mean: 

Adding New Country

Adding New Country

Hi,

 

I want to add a new country(Kosovo). I am using Magento 2.2.5.

 

Thank you!

6 REPLIES 6

Re: Adding New Country

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"

 

Re: Adding New Country

There is no zend folder inside lib folder. 

Re: Adding New Country

@qubitzz_co

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

 

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: Adding New Country

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

Re: Adding New Country

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

 

Re: Adding New Country

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?