Browser language preferences: navigator.languages is coming

Browsers provide an option to choose the preferred language a website to be shown, often named as “Accept language“. [][2]Firefox accept language preference These preference values allows websites to deliver a suitable language version to the user. For the developers, to read this value, the existing options is to check the Accept-Language http header value. It works and many websites use it already. But this value was never exposed at client side. Javascript cannot access the value of these preferences. There are many use cases where this is preferred. Handling i18n at client side is one of this. ...

May 17, 2014 · 2 min · Santhosh Thottingal