diff --git a/lib/ice_cube/i18n.rb b/lib/ice_cube/i18n.rb index 6f135026..45a7f4a2 100644 --- a/lib/ice_cube/i18n.rb +++ b/lib/ice_cube/i18n.rb @@ -17,7 +17,8 @@ def self.backend end def self.detect_backend! - ::I18n.load_path += Dir[File.join(LOCALES_PATH, "*.yml")] + rails_i18n_index = ::I18n.load_path.index { |item| item =~ /rails_i18n/ } || -1 + ::I18n.load_path.insert(rails_i18n_index, *Dir[File.join(LOCALES_PATH, "*.yml")]) ::I18n rescue NameError NullI18n