]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/application_controller.rb
Make it easier to test alternative locales
[rails.git] / app / controllers / application_controller.rb
index 8f9ae29481b8baeee5517deb1c5e80c6670c9eec..70a635404038efbc04beb0eb8231c85b90db644d 100644 (file)
@@ -278,7 +278,7 @@ class ApplicationController < ActionController::Base
       end
     end
 
       end
     end
 
-    I18n.locale = request.compatible_language_from(I18n.available_locales) || I18n.default_locale
+    I18n.locale = params[:locale] || request.compatible_language_from(I18n.available_locales) || I18n.default_locale
 
     response.headers['Content-Language'] = I18n.locale.to_s
   end
 
     response.headers['Content-Language'] = I18n.locale.to_s
   end