When I submit a form with an error in it, it returns an error message. How can I translate these error messages with i18n? I already have translation for all the other texts in my views, so I know how l18n works in Rails. I now get this:
2 errors prohibited this user from being saved:
Email translation missing: nl.activerecord.errors.models.user.attributes.email.blank
Email translation missing: nl.activerecord.errors.models.user.attributes.email.blank
I want to translate both the title and the errors.
The translation for the title would be:
For translating the error messages, Rails will use the following order of translations:
So you could add:
It’s documented in the Rails Internationalization (I18n) API Guide, which might give you some more insight.