diff options
Diffstat (limited to 'config/initializers/alaveteli.rb')
-rw-r--r-- | config/initializers/alaveteli.rb | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index d78bc3925..deee3f6da 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -34,14 +34,6 @@ if AlaveteliConfiguration::force_ssl ActionMailer::Base.default_url_options[:protocol] = "https" end -# fallback locale and available locales -available_locales = AlaveteliConfiguration::available_locales.split(/ /) -default_locale = AlaveteliConfiguration::default_locale - -FastGettext.default_available_locales = available_locales -I18n.locale = default_locale -I18n.available_locales = available_locales.map {|locale_name| locale_name.to_sym} -I18n.default_locale = default_locale # Load monkey patches and other things from lib/ require 'ruby19.rb' @@ -57,6 +49,10 @@ require 'public_body_categories' require 'ability' require 'normalize_string' require 'alaveteli_file_types' +require 'alaveteli_localization' + +AlaveteliLocalization.set_locales(AlaveteliConfiguration::available_locales, + AlaveteliConfiguration::default_locale) # Allow tests to be run under a non-superuser database account if required if Rails.env == 'test' and ActiveRecord::Base.configurations['test']['constraint_disabling'] == false |