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 ?
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