Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [9a3a4d6aefa7e2ca94340754eb5541bea1783de0] by Sven Fuchs

Revision 9a3a4d6aefa7e2ca94340754eb5541bea1783de0, committed by Sven Fuchs · April 17th, 2010 @ 07:26 PM

Make i18n fallbacks configurable and fallback to the default locale by default in production [#4428 state:resolved]

Allows to configure locale fallbacks through config.i18n.fallbacks. The default setting
config.i18n.fallbacks = true in production.rb will make I18n.t lookup fallback to the
I18n.default_locale if a translation could not be found for the current or given locale.

config.fallbacks = true

config.fallbacks.map = { :ca => :es }
config.fallbacks.defaults = [:'es-ES', :es]

config.fallbacks = [:'es-ES', :es]

config.fallbacks = { :ca => :es }

config.fallbacks = [:'es-ES', :es, { :ca => :es }]

Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/9a3a4d6aefa7e2ca94340754eb5541...

3 changed files

  • A railties/test/railties/i18n_railtie_test.rb
  • M activesupport/lib/active_support/railtie.rb
  • M railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt