TransWikia.com

Add new country in default country dropdown in Magento 2.3.5

Magento Asked by jemstone on November 19, 2021

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

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!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP