Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

localization in Rails

I know that in Rails, we can put localization file under config/locales to achieve the localization purpose.

For example config/locales/en.yml contains all the text in English and config/locales/fr.yml contains all the text in French.

But how about Chinese? If I would like to make a web app. which also has Chinese version, is it so that I just simply translate all texts into Chinese then put it under config/locales/ch.yml ? Any other sophisticated way for app. Chinese localization ?

like image 691
Mellon Avatar asked Nov 20 '25 18:11

Mellon


1 Answers

As zed_0xff said, you need to call the file with zh as the language. To translate content, copy the en.yml file to zh.yml (for example), translate the content into Chinese, then set the locale to 'zh' within your app.

like image 194
David Sulc Avatar answered Nov 22 '25 13:11

David Sulc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!