diff --git a/README.textile b/README.textile index 3097a5579..a2ebe9dc7 100644 --- a/README.textile +++ b/README.textile @@ -121,3 +121,4 @@ Since I first released this library, there's been quite a few people who have su * Max Lapshin * Martin Emde * David Wennergren +* Mark Lane diff --git a/rails/init.rb b/rails/init.rb index 82ea0eecc..5e6fb2685 100644 --- a/rails/init.rb +++ b/rails/init.rb @@ -2,5 +2,13 @@ require 'action_controller/dispatcher' ActionController::Dispatcher.to_prepare :thinking_sphinx do + # Force internationalisation to be loaded. + if Rails::VERSION::STRING.to_f > 2.2 + I18n.backend.reload! + I18n.backend.available_locales + elsif Rails::VERSION::STRING.to_f > 2.1 + I18n.backend.load_translations(*I18n.load_path) + end + ThinkingSphinx::Configuration.instance.load_models end