diff options
Diffstat (limited to 'config/environment.rb')
-rw-r--r-- | config/environment.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/config/environment.rb b/config/environment.rb index 28598a9ef..9177b3712 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -116,19 +116,20 @@ if (MySociety::Config.get("DOMAIN", "") != "") end # fallback locale and available locales -I18n.default_locale = :en if ENV["RAILS_ENV"] == "test" # The tests assume that the "en" and "es" locales are available FastGettext.default_available_locales = ["en", "es"] + I18n.default_locale = :en else - available_locales = MySociety::Config.get('AVAILABLE_LOCALES', 'en') - FastGettext.default_available_locales = available_locales.split() + available_locales = MySociety::Config.get('AVAILABLE_LOCALES', 'en es') + default_locale = MySociety::Config.get('DEFAULT_LOCALE', 'en') + FastGettext.default_available_locales = available_locales.split(/ /) + I18n.default_locale = default_locale end # Load monkey patches and other things from lib/ require 'tmail_extensions.rb' require 'activesupport_cache_extensions.rb' -require 'public_body_categories.rb' require 'timezone_fixes.rb' require 'use_spans_for_errors.rb' require 'make_html_4_compliant.rb' |