cancel
Showing results for 
Search instead for 
Did you mean: 

How to change shipping address country name of Taiwan instead of Taiwan, province of China.

How to change shipping address country name of Taiwan instead of Taiwan, province of China.

I am using Magento2.3.6.

I want to change shipping address country name of "Taiwan" instead of "Taiwan, province of China". How can I update for it?

I tried to update in app/code/Magento/Config/i18n/en_US.csv. But can't.

https://drive.google.com/file/d/1lxWOiZf4YD5IUsBGbHlI-puYUVa-1yhO/view?usp=sharing

3 REPLIES 3

Re: How to change shipping address country name of Taiwan instead of Taiwan, province of China.

Hi @VisibeeNang 

 

Country name have been provided by magento itself with country codes. on the time of installation Magento make entries in the Database table (msp_tfa_country_codes) through a JSON file (Country_codes.json) via install schema.

 

There are 2 way to update country names ( You should not change the country code ):

  1. Using i18n for the en_US.csv - You can overwrite translation file for the desire language in your custom module or installed theme.

    "Taiwan, Province of China","Taiwan"
  2. Update in Database directly ( Less recommended )

tw.png

 

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: How to change shipping address country name of Taiwan instead of Taiwan, province of China.

Hi @Kapil_Thakur 

 

Thanks for your support.

I want to try 1st way. But still finding default en_US.csv. Can I create new en_US.csv file under my installed theme app/design/frontend/Codazon/unlimited/default/i18n ? Now already had 2 translation file zh_Hans_CN.csv and zh_Hant_TW.csv under this.

 

2nd way ===
If I update "country name" only in database, it will be affected website programming?

I am Magento beginner. Thanks.

Re: How to change shipping address country name of Taiwan instead of Taiwan, province of China.

@VisibeeNang 

 

 

If you have zh_Hans_CN.csv and zh_Hant_TW.csv, it might be possible you have multi langual web site. Then you need to follow first way only, this is appropriate and for this you need to update all translation files you have in i18n directory.

 

"Country","Country Translated"

 

"Taiwan, province of China", "Taiwan"

 

 

2nd way == ( Not recommended )

No, it will not. As Magento picks country name by country code, which we can not change. Country name is a static string so after making any update in country name in database it will not affect any programming.