diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-06 11:17:54 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-06 11:17:54 +0100 |
commit | 1d1f09f925003af45265d0df29791ff8fdf2b7ed (patch) | |
tree | 7d520d50fd19fa7dbaf0ab99d2a6bf2787b125e1 | |
parent | b86941269b638c61bf90adbd8ef6a7c724242a1c (diff) |
Get default locale from config, and set default values to work with tests etc
-rw-r--r-- | config/environment.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/config/environment.rb b/config/environment.rb index f268233c6..9177b3712 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -116,13 +116,15 @@ if (MySociety::Config.get("DOMAIN", "") != "") end # fallback locale and available locales -I18n.default_locale = :sq 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', 'sq en sr') + 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/ |