public function init($arrAccepted, $strDefault, $bolStore=true) {
		$strLang = isset($_GET['lang']) ? $_GET['lang']
				: (isset($_SESSION['lang']) ? $_SESSION['lang']
				: (isset($_COOKIE['lang']) ? $_COOKIE['lang'] : false));
		if (!$strLang || !in_array($strLang, $arrAccepted)) {
			$browser = self::askBrowser($arrAccepted, $strDefault);
			$strLang = $browser['lang'];
		}
		if ($bolStore) {
			$_SESSION['lang'] = $strLang;
			setcookie('lang', $strLang, time() + 315885600);
		}
		$this->strCurrent = $strLang;
		return $strLang;
	}
public function init($arrAccepted, $strDefault, $bolStore=true) {
		$strLang = isset($_GET['lang']) ? $_GET['lang']
				: (isset($_SESSION['lang']) ? $_SESSION['lang']
				: (isset($_COOKIE['lang']) ? $_COOKIE['lang'] : false));
		if (!$strLang || !in_array($strLang, $arrAccepted)) {
			$browser = self::askBrowser($arrAccepted, $strDefault);
			$strLang = $browser['lang'];
		}
		if ($bolStore) {
			$_SESSION['lang'] = $strLang;
			setcookie('lang', $strLang, time() + 315885600);
		}
		$this->strCurrent = $strLang;
		return $strLang;
	}
public function init ( $ arrAccepted , $ strDefault , $ bolStore = true ) { $ strLang = isset ( $ _GET [ 'lang' ] ) ? $ _GET [ 'lang' ] : ( isset ( $ _SESSION [ 'lang' ] ) ? $ _SESSION [ 'lang' ] : ( isset ( $ _COOKIE [ 'lang' ] ) ? $ _COOKIE [ 'lang' ] : false ) ) ; if ( ! $ strLang || ! in_array ( $ strLang , $ arrAccepted ) ) { $ browser = self :: askBrowser ( $ arrAccepted , $ strDefault ) ; $ strLang = $ browser [ 'lang' ] ; } if ( $ bolStore ) { $ _SESSION [ 'lang' ] = $ strLang ; setcookie ( 'lang' , $ strLang , time ( ) + 315885600 ) ; } $ this -> strCurrent = $ strLang ; return $ strLang ; }
Initialized the language variable and stores it in the session

@param array $arrAccepted All accepted languages
@param string $strDefault Default language code
@param bool $bolStore Switch to store language in the current session
Initialized the language variable and stores it in the session