slitaz-forge view boot/index.php @ rev 711

Update pangolin
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jan 01 18:26:56 2020 +0100 (5 months ago)
parents
children
line source
1 <?php
2 foreach (explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]) as $lang) {
3 foreach (array(';',' ','-') as $char) {
4 if (($n = strpos($lang, $char)) !== false)
5 $lang = substr($lang,0,$n);
6 }
7 if (is_dir($lang)) break;
8 $lang = "en";
9 }
10 header("Location: $lang/");
11 ?>