E
E
eldar_web2016-11-19 15:29:54
Ruby on Rails
eldar_web, 2016-11-19 15:29:54

How to translate error text into Russian in Ruby on Rails?

Well, if saving/adding does not fit the model's requirement, then a number of errors come through @model.errors.
Here it comes in English.
How does it output in Russian?
This is how they come:
Title translation missing: ru.activerecord.errors.models.event.attributes.title.blank

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Andreev, 2016-11-19
@eldar_web

guides.rubyonrails.org/active_record_validations.h...
You can add the message parameter
You can write your own validations and add errors, something like this
guides.rubyonrails.org/active_record_validations.h...
You can include the gem https://github.com/yaroslav /russian , it will translate all error messages into Russian (and not only that)

R
Roman Mirilaczvili, 2016-11-19
@2ord

guides.rubyonrails.org/i18n.html#translations-for-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question