slitaz-forge diff boot/index.php @ rev 688

scn: bigger font (match website)
author Christophe Lincoln <pankso@slitaz.org>
date Sat Mar 25 00:01:52 2017 +0100 (2017-03-25)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/boot/index.php	Sat Mar 25 00:01:52 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 +?>