skip to Main Content

We have Magento version 2.2.5.

We try to enable (add) Kosovo.

So:

  1. add in DB directory_country XK, XK and XKX
  2. go in /vendor/magento/zendframework1/library/Zend/Locale/Data and
    edit en.xml/it.xml with Kosovo (already exist) also add Kosovo
  3. flush cache with console

When we go to admin configuration to general to add available country not exist. We try also to add a test country and not working. We also try to edit /vendor/magento/module-directory/etc/config.xml add allow country.

How we can do?

2

Answers


  1. 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.

    Login or Signup to reply.
  2. I followed the below link and it helps me to add a new country

    Add new nation into nation’s list in Magento 2.3.5

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search