InsideDarkWeb.com

Add new country in default country dropdown in Magento 2.3.5

I need to add new country and its regions/states in Magento 2.3.5
I have already done this for Magento1. There are many references available and provide common solution like add entry in directory_country table and changes in vendor/magento/zendframework1/library/Zend/Locale/Data/en.xml file.
reference: https://community.magento.com/t5/Installing-Magento-2-x/How-to-add-new-country-on-Magento-2-1-1/m-p/69286/highlight/true#M2943
But solutions does not work with Magento 2.3.5

Regards

Magento Asked by jemstone on November 19, 2021

2 Answers

2 Answers

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

Answered by Kushal on November 19, 2021

With reference to this link.

Step1: Open vendormagentozendframework1libraryZendLocaleDataen.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

Hope it will work for you.

Happy Coding.

Answered by Mayur Sisodiya on November 19, 2021

Add your own answers!

Related Questions

Magento 2 Access-Control-Allow-Origin

2  Asked on September 9, 2020 by borche-glafche

   

Magento 2: what is the catalog_attributes.xml file?

2  Asked on September 7, 2020 by raphael-at-digital-pianism

       

magento 2 – modify db_schema.xml field length

1  Asked on September 4, 2020 by sairaj-gadekar

 

Magento 2.3.2 Upgrade to 2.4

2  Asked on September 4, 2020 by hatim

 

Magento 2: Make sales without stock

1  Asked on August 9, 2020 by hudson-alves-triunfante

     

Magento 2 : print_r or var_dump is not working

4  Asked on July 30, 2020 by zed-blackbeard

   

Create quick order form at product page

0  Asked on July 29, 2020 by faraz-bashir

   

How to Special price based on attribute?

2  Asked on July 26, 2020 by user90560

     

is creating block within template in magento 2 good practice

0  Asked on July 24, 2020 by herve-tribouilloy

       

Ask a Question

Get help from others!

© 2021 InsideDarkWeb.com. All rights reserved.