infrabel / themes-gnap

Standardized build to produce web themes for use with GNaP.
http://gnap.io/
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Detect Accept-Language headers #52

Open CumpsD opened 10 years ago

CumpsD commented 10 years ago

Currently when a user visits the site, we determine the default language by checking and window navigator language.

This is better than just hard coding a default, since it checks at the language of the browser, which probably is the same as the language of the user.

However, this is not always the case. But since we don't have access to accept headers in javascript, this information has to come from the server.

Thus we should provide a facility to set the language programmatically, but only on first load.