I am using Rails 5.2.2 . I use the method:
distance_of_time_in_words(@customer.accounts.last.updated_at,Time.now)
And this gives me the output like " 9 days
". I want to change that days
to my language.What is the correct way to change it ?
Install the I18n Gem
and in config/environment/development.rb
add this line
config.i18n.default_locale = :fr #:fr is for french language for example
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.