time_ago_in_words and localize

前端 未结 2 605
离开以前
离开以前 2020-12-30 07:08

Is it possible to use time_ago_in_words with i18n.locale?

how?

thanks

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-30 07:32

    If you are using Rails > 2.2, the helper is already locale-aware.

    Just download the right localization file from the locale repository and store it into your /config/locales path. Then set your locale preferences.

提交回复
热议问题