I\'m trying to build multilangual site.
I use this piece of code to detect users language. If you havent chosen a language, it will include your language file based
if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ $parts=explode(';',$_SERVER['HTTP_ACCEPT_LANGUAGE']); $langs=explode(',',$parts[0]); var_dump($langs); }