slitaz-forge annotate 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 |
rev | line source |
---|---|
al@602 | 1 <?php |
al@602 | 2 foreach (explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]) as $lang) { |
al@602 | 3 foreach (array(';',' ','-') as $char) { |
al@602 | 4 if (($n = strpos($lang, $char)) !== false) |
al@602 | 5 $lang = substr($lang,0,$n); |
al@602 | 6 } |
al@602 | 7 if (is_dir($lang)) break; |
al@602 | 8 $lang = "en"; |
al@602 | 9 } |
al@602 | 10 header("Location: $lang/"); |
al@602 | 11 ?> |