我不知道config.i18n.load_path
和I18n.load_path
的区别。
https://stackoverflow.com/questions/32880561/config-i18n-load-path-and-i18n-load-path-difference
我使用https://github.com/mcasimir/devise-i18n-views。
activerecord:
attributes:
user:
在config/locales/models/*.yml
,config/locales/devise*.yml
,gems/devise-i18n-views-0.3.5/locales/*.yml
。
我认为优先考虑。
http://guides.rubyonrails.org/i18n.html没有说I18n的优先级。
答案 0 :(得分:0)
我不确定知道优先权会对你有所帮助。
问题是,当您在开发模式下更改某些语言环境文件时,当您的服务器仍在运行时,将重新加载已更改的文件,并将覆盖现有的activerecord.attributes.user
范围。
所以我认为最可靠的方法是将activerecord
范围提取到activerecord.yml
文件。