I'm using this $lang=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
to detect the language of the browser. At first, I thought something was wrong with my code. But then I tried this demo, and even if I had my 'display preferred language' as Spanish (es), it displayed the content English (en). Finally, I figured out that it doesn't work in localhost (Using wamp server 2), but it does online.
Any suggestions?