AutoCommit Son Aug 30 18:03:01 CEST 2015

This commit is contained in:
Andreas Stephanides
2015-08-30 18:03:01 +02:00
parent 9dd9c3cc48
commit 2d9944dfc3
4 changed files with 39 additions and 20 deletions

View File

@@ -16,7 +16,13 @@
end
end
I18n.locale = session[:locale] || request.env['HTTP_ACCEPT_LANGUAGE'].scan(/^de|en/).first || I18n.default_locale
http_header=request.env['HTTP_ACCEPT_LANGUAGE']
unless http_header.nil?
ht= http_header.scan(/^de|en/).first
else
ht=nil
end
I18n.locale = session[:locale] || ht || I18n.default_locale
session[:locale] = I18n.locale