我有一个 Rails 3.2 应用程序。它有 2 个语言环境 ko 和 en。ko 是默认设置,但如果它不可用,我希望它回退到 en。回退在开发环境中有效,但在生产环境中无效。
[config/application.rb]
config.i18n.default_locale = :ko
config.i18n.fallbacks = [:en]
[config/environments/production.rb]
config.i18n.fallbacks = true
[config/locales/en.yml]
ttt: TTT
[config/locales/ko.yml]
(ttt is not defined)
**In development console:**
I18n.locale #=> :ko
I18n.t("ttt") #=> "TTT" (Works fine)
**In production console:**
I18n.locale #=> :ko
I18n.t("ttt") #=> "translation missing: ko.ttt" (Not working)
我错过了什么?