During Magento2 installation, I chose "Chinese (Hong Kong)" as the locale for the store.
After install, I try to customize the "Sign In" label in the frontend page to Chinese. What I did was below:
- Created a new theme which inherits Luma theme (with a custom logo)
- Create a folder "i18n" under the theme directory
- Create a file "zh_HK.csv" (standard locale code for Chinese Hong Kong) with the following line:
- "Sign In","登入"
- Apply the theme and flush all caches
However, when I go to frontend and refresh the page, I cannot see the label in Chinese. I can only change the label when using "en_US" as the locale and enter my custom labels in the file en_US.csv.
I am sure the new theme is working as it can load the custom logo.
Does anyone else had experience in performing frontend translation in other locale, and provide some advice on how to troubleshoot it?
Many thanks
Clarence
Maybe this can help you: https://community.magento.com/t5/Programming-Questions/Translations-and-language-packs/m-p/25014#U25...
I didn't found any official/right answer to be sure but I guess that those steps are neccesary.
Dear Damian,
The page you provide is very useful.
The following are the steps that I had taken:
composer require skywidesoft/magento2-language-zh_hk
php bin/magento i18n:pack --mode=merge -d vendor/skywidesoft/magento2-language-zh_hk/zh_hk.csv . zh_Hant_HK
php bin/magento setup:static-content:deploy zh_Hant_HK
I believe there is some issue in the translation tool in handling strings with single quote character.
Regards
Clarence