User requests some page and I want to know (on server side) what is the language in his/her browser. So I could render template with the right messages.
On client side it's easy:
var language = window.navigator.userLanguage || window.navigator.language