src/Module.php
private function saveLanguageIntoCookie($language)
    {
        $cookie = new Cookie([
            'name' => $this->cookieName,
            'value' => $language,
            'expire' => time() + 86400 * $this->expireDays,
        ]);
        Yii::$app->response->cookies->add($cookie);
    }
private function saveLanguageIntoCookie($language)
    {
        $cookie = new Cookie([
            'name' => $this->cookieName,
            'value' => $language,
            'expire' => time() + 86400 * $this->expireDays,
        ]);
        Yii::$app->response->cookies->add($cookie);
    }
private function saveLanguageIntoCookie ( $ language ) { $ cookie = new Cookie ( [ 'name' => $ this -> cookieName , 'value' => $ language , 'expire' => time ( ) + 86400 * $ this -> expireDays , ] ) ; Yii :: $ app -> response -> cookies -> add ( $ cookie ) ; }
Save language into cookie.
@param string $language
Save language into cookie .