fix get_language_array
This commit is contained in:
parent
75456cd6bb
commit
936bfb6c9f
|
@ -58,13 +58,11 @@ function get_language_array(){
|
||||||
$language="";
|
$language="";
|
||||||
if( isset($_GET['lang']) ){
|
if( isset($_GET['lang']) ){
|
||||||
|
|
||||||
$lang = $_GET['lang'];
|
$language = $_GET['lang'];
|
||||||
setcookie( 'lang', $language, time() + 60*60*24*30 );
|
setcookie( 'lang', $language, time() + 60*60*24*30 );
|
||||||
|
|
||||||
}elseif( isset($_COOKIE['lang']) ){
|
}elseif( isset($_COOKIE['lang']) ){
|
||||||
|
|
||||||
$language=$_COOKIE['lang'];
|
$language=$_COOKIE['lang'];
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
if(in_array(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),$langsAvailable)){
|
if(in_array(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),$langsAvailable)){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user