original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Set the language for the session
  
  @param string $languageCode ISO language code
  @return bool
docstring_tokens: Set the language for the session