Detect Browser Language with PHP
$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
$webDictionary = ['en', 'de', 'tr']; 
$language = in_array($language, $webDictionary) ? $language : 'en';