Extracts the browser language. Returns the first two letters i.e.: de, en, fr
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); echo $lang;