]> git.openstreetmap.org Git - rails.git/commitdiff
Actually set the locale from the users browser request, rather than just parsing it.
authorShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 27 May 2009 12:57:28 +0000 (12:57 +0000)
committerShaun McDonald <shaun@shaunmcdonald.me.uk>
Wed, 27 May 2009 12:57:28 +0000 (12:57 +0000)
app/controllers/application.rb

index 97332ba01eeabd25b58398450b3cd9097e3a0c64..3d16ffa6954d22db95c3f2bad0d00c70cdceef33 100644 (file)
@@ -102,7 +102,7 @@ class ApplicationController < ActionController::Base
   end
   
   def set_locale
-    request.compatible_language_from(I18n.available_locales)
+    I18n.locale = request.compatible_language_from(I18n.available_locales)
   end
 
   def api_call_handle_error