# handle authenticate pass/fail
unless @user
# no auth, the user does not exist or the password was wrong
- response.headers["Status"] = "Unauthorized"
response.headers["WWW-Authenticate"] = "Basic realm=\"#{realm}\""
render :text => errormessage, :status => :unauthorized
return false
end
end
- I18n.locale = request.compatible_language_from(I18n.available_locales)
-
+ I18n.locale = request.preferred_language_from(I18n.available_locales) ||
+ request.compatible_language_from(I18n.available_locales)
+ logger.info("Select #{I18n.locale} matching #{request.user_preferred_languages.join(',')} against #{I18n.available_locales.join(',')}")
response.headers['Content-Language'] = I18n.locale.to_s
end