开发者

Unable to use I18n.t call in an initializer file

开发者 https://www.devze.com 2023-01-12 07:20 出处:网络
I would like to use I18n.t call in an initializer开发者_如何转开发 file. Unfortunately, it doesn\'t work. Rails returns the usual \"translation missing:\" message.

I would like to use I18n.t call in an initializer开发者_如何转开发 file. Unfortunately, it doesn't work. Rails returns the usual "translation missing:" message. It seems that the I18n files haven't been loaded yet when the call is made.

Are there any workarounds ?

Thanks


I had the problem when I was using Rails 2.3.2. Since then, I've migrated to 2.3.5 and I18n.t calls work fine in my initializers.

0

精彩评论

暂无评论...
验证码 换一张
取 消