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
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 ):
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"
Hope this helps you!
Problem Solved! Click Kudos & Accept as Solution!
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.
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.
Unfortunately this does not actually change the country_of_manufacture attribute.
Even after the DB change, the attribute stays the same. I have re-indexed the store, wiped cache and it's still set to Taiwan, Province of China.
Any other ideas on how to change that attribute?
Yes, These changes will not make changes for product attribute "Country of manufacture". This is because product attribute "Country of manugacture" has there own values(countries name) defined in admin.
Store > Attributes > Product > search and edit "country_of_manufacture"
You will see the dropdown options here. All options are there disabled becuase this attributes is not user_defined.
Thank
@Kapil_Thakur wrote:
Yes, These changes will not make changes for product attribute "Country of manufacture". This is because product attribute "Country of manugacture" has there own values(countries name) defined in admin.
Store > Attributes > Product > search and edit "country_of_manufacture"
You will see the dropdown options here. All options are there disabled becuase this attributes is not user_defined.
Thank
This is a very informative blog for me. I am very much benefited after reading this blog. Keep sharing.
Hi, have you find the solution?
thx