Code: Alles auswählen
<?PHP
$clientLanguages = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
$mainClientLanguage = substr($clientLanguages,0,2);
if ($mainClientLanguage == "de"){
include_once ($_SERVER['DOCUMENT_ROOT']."/de/index.php");
}else if($mainClientLanguage == "en"){
include_once ($_SERVER['DOCUMENT_ROOT']."/en/index.php");
}else if($mainClientLanguage == "it"){
include_once ($_SERVER['DOCUMENT_ROOT']."/it/index.php");
}else if($mainClientLanguage == "fr"){
include_once ($_SERVER['DOCUMENT_ROOT']."/fr/index.php");
}else{
include_once ($_SERVER['DOCUMENT_ROOT']."/de/index.php");
}
?>