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
You can use req.headers[“accept-language”] to get the language/locale the user has set in his browser.
For easier support, you may want to look into a locale module.