Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
enとruに翻訳されたページがあります。ユーザーが他のロケールでページにアクセスする場合は、そのロケールで使用したいと思います。それはまずまずですか?
config.i18n.fallbacks = true config.i18n.default_locale = "en"
config.i18n.fallbacks = true
config.i18n.default_locale = "en"
次のことを実行できるヘルパーメソッドを作成できます。
def trans(key) I18n.t(key, :default => I18n.t(key, :locale => :en)) end