Subversion Repositories ALCASAR

Rev

Rev 2800 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2800 Rev 2802
Line 42... Line 42...
42
include_once PSI_APP_ROOT.'/read_config.php';
42
include_once PSI_APP_ROOT.'/read_config.php';
43
 
43
 
44
if (defined('PSI_DEFAULT_LANG')) {
44
if (defined('PSI_DEFAULT_LANG')) {
45
    $lang = PSI_DEFAULT_LANG;
45
    $lang = PSI_DEFAULT_LANG;
46
}
46
}
47
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
-
 
48
	$lang = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
-
 
49
	$lang = strtolower(substr(chop($lang[0]), 0, 2));
-
 
50
}
-
 
51
/** ALCASAR changes
47
/** ALCASAR changes
52
 *  $lang set by the web browser config
48
 *  $lang set by the web browser config
53
 *
-
 
54
 */
49
 */
55
 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
50
 if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
56
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
51
	$Langue	  = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
57
	$lang = strtolower(substr(chop($Langue[0]), 0, 2));
52
	$lang = strtolower(substr(chop($Langue[0]), 0, 2));
58
 
53
}
59
//if (isset($_GET['lang']) && (trim($_GET['lang'])!=="")
54
//if (isset($_GET['lang']) && (trim($_GET['lang'])!=="")
60
//   && !preg_match('/[^A-Za-z\-]/', $_GET['lang'])
55
//   && !preg_match('/[^A-Za-z\-]/', $_GET['lang'])
61
//   && file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) {
56
//   && file_exists(PSI_APP_ROOT.'/language/'.$_GET['lang'].'.xml')) {
62
//    $lang = strtolower($_GET['lang']);
57
//    $lang = strtolower($_GET['lang']);
63
//}
58
//}