slitaz-forge diff boot/index.php @ rev 692
revision of german messages
author | Hans-G?nter Theisgen |
---|---|
date | Mon Oct 09 17:09:00 2017 +0100 (2017-10-09) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/boot/index.php Mon Oct 09 17:09:00 2017 +0100 1.3 @@ -0,0 +1,11 @@ 1.4 +<?php 1.5 +foreach (explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]) as $lang) { 1.6 + foreach (array(';',' ','-') as $char) { 1.7 + if (($n = strpos($lang, $char)) !== false) 1.8 + $lang = substr($lang,0,$n); 1.9 + } 1.10 + if (is_dir($lang)) break; 1.11 + $lang = "en"; 1.12 +} 1.13 +header("Location: $lang/"); 1.14 +?>