public function setCookie()
    {
        $language = current($this->getLanguages());
        if ($language !== Yii::$app->language) {
            $this->cookie->value = Yii::$app->language;
            $this->response->getCookies()->add($this->cookie);
        }
    }
public function setCookie()
    {
        $language = current($this->getLanguages());
        if ($language !== Yii::$app->language) {
            $this->cookie->value = Yii::$app->language;
            $this->response->getCookies()->add($this->cookie);
        }
    }
public function setCookie ( ) { $ language = current ( $ this -> getLanguages ( ) ) ; if ( $ language !== Yii :: $ app -> language ) { $ this -> cookie -> value = Yii :: $ app -> language ; $ this -> response -> getCookies ( ) -> add ( $ this -> cookie ) ; } }
Sets the cookie.
Sets the cookie .