Translating Rails Timezones

前端 未结 9 666
滥情空心
滥情空心 2021-02-05 11:09

We internationalized our site months ago, but forgot one part: The drop down where a user picks their timezone.

How do you translate the following line:



        
9条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-05 11:33

    I took some ideas in this post and built a gem to handle timezone translations. I've only got en and es translations right now but its pretty easy to add it to your app and add more locale. Just add this to your Gemfile:

    gem i18n-timezones

    You can grab the source here:

    https://github.com/onomojo/i18n-timezones

提交回复
热议问题