Switch locale to zh_CN for JH users who not logged in
Issue link
Proposal
We can not directly change the default language of Rails App to zh_CN
, which will cause some known and unknown effects.
Reference comment:
Logged-in users can set their own preferred language to change the language display on the page.
Currently, unlogged-in users are shown pages in English, especially the login and register pages.
We need to change the default language of these pages to Chinese.
Code
Apply switch_locale
for those Controller througn around_action
.
Referance Rails Doc: https://guides.rubyonrails.org/i18n.html#managing-the-locale-across-requests
由 Fu Zhang 编辑于