public static function setLanguageForSession($languageCode)
    {
        if (!API::getInstance()->isLanguageAvailable($languageCode)) {
            return false;
        }

        $cookieName = Config::getInstance()->General['language_cookie_name'];
        $cookie = new Cookie($cookieName, 0);
        $cookie->set('language', $languageCode);
        $cookie->setSecure(ProxyHttp::isHttps());
        $cookie->save();
        return true;
    }
public static function setLanguageForSession($languageCode)
    {
        if (!API::getInstance()->isLanguageAvailable($languageCode)) {
            return false;
        }

        $cookieName = Config::getInstance()->General['language_cookie_name'];
        $cookie = new Cookie($cookieName, 0);
        $cookie->set('language', $languageCode);
        $cookie->setSecure(ProxyHttp::isHttps());
        $cookie->save();
        return true;
    }
public static function setLanguageForSession ( $ languageCode ) { if ( ! API :: getInstance ( ) -> isLanguageAvailable ( $ languageCode ) ) { return false ; } $ cookieName = Config :: getInstance ( ) -> General [ 'language_cookie_name' ] ; $ cookie = new Cookie ( $ cookieName , 0 ) ; $ cookie -> set ( 'language' , $ languageCode ) ; $ cookie -> setSecure ( ProxyHttp :: isHttps ( ) ) ; $ cookie -> save ( ) ; return true ; }
Set the language for the session

@param string $languageCode ISO language code
@return bool
Set the language for the session