diff --git a/src/functions.php b/src/functions.php index ee4c600..e73c20a 100644 --- a/src/functions.php +++ b/src/functions.php @@ -56,15 +56,13 @@ function get_language_array(){ $langsAvailable=array('fr','en'); $language=""; - if( isset($_GET['lang']) ){ - - $lang = $_GET['lang']; + if( isset($_GET['lang']) ){ + + $language = $_GET['lang']; setcookie( 'lang', $language, time() + 60*60*24*30 ); }elseif( isset($_COOKIE['lang']) ){ - $language=$_COOKIE['lang']; - }else{ if(in_array(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2),$langsAvailable)){