3

I have page that translated to en and ru. If user will come to page with other locale, i want that to be used en locale. Is it passible?

Oksana
  • 13,442
  • 10
  • 53
  • 89
  • 1
    possible duplicate with: http://stackoverflow.com/questions/2324398/fall-back-to-default-language-if-translation-missing (see second answer) – Baldrick May 09 '12 at 09:12

2 Answers2

9

config.i18n.fallbacks = true

config.i18n.default_locale = "en"

Community
  • 1
  • 1
Oksana
  • 13,442
  • 10
  • 53
  • 89
1

You can create a helper method in which you can do the following:

def trans(key)
  I18n.t(key, :default => I18n.t(key, :locale => :en))
end
KARASZI István
  • 30,900
  • 8
  • 101
  • 128