我正在使用 rails_admin ( https://github.com/sferik/rails_admin ) 但我无法翻译字段名称。
这是我的 yml 文件的简化版本:
pt-BR:
activerecord:
attributes:
user:
password: "Senha"
这不正确吗?我的意思是,它不应该将“密码”翻译成“Senha”吗?
我正在使用 rails_admin ( https://github.com/sferik/rails_admin ) 但我无法翻译字段名称。
这是我的 yml 文件的简化版本:
pt-BR:
activerecord:
attributes:
user:
password: "Senha"
这不正确吗?我的意思是,它不应该将“密码”翻译成“Senha”吗?
你应该添加你的翻译config/locales/rails_admin.pt-BR.yml
,事实上你可以从这个文件开始:
https://gist.github.com/1844723#file_rails_admin.pt_br.yml
其他语言列表在这里:https ://github.com/sferik/rails_admin/wiki/Translations