Create attributes for i18n?

How can I translate attributes of Devise models? For instance. session.email or session.remember_me .

Both hierarchies

 de: devise: sessions: email: "E-Mail" 

and

 de: activerecord: attributes: session: email: "E-Mail" 

does not work. What is the correct identifier?

+4
source share
2 answers

I myself came across a solution: I need to define model names in the simple_form namespace, as described here: https://github.com/plataformatec/simple_form (below).

+3
source

Devise I18n configuration files are intended for flash messages and headers for e-mail messages. You need to generate views and change them accordingly:

 rails generate devise:views 
0
source

Source: https://habr.com/ru/post/908693/


All Articles