I'm using devise gem to implement authentication in my Ruby On Rails application. Sometimes error messages are displayed such as:
Prohibited an error being wellness saved from this user: Password is too short (minimum is 6 characters)
What is the best way to translate these messages to another language?
Go to config/locales
and copy devise.en.yml
, giving the file a name like devise.other_language_initials.yml. Then add your own translations.
For more info on how to translate your application, go here .
The fastest way is downloading a translation file to the language you want. You can find more about in this link .
What you are going to find there is a bunch of files in different languages for Devise flash notifications that you can download and add to you application under config/locales .
Hope that helps you! :)
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.