/**
  * 
  * Returns the default site language code, indicating clearly when not set
  * 
  * @return int
  */
 public function actionGetDefault()
 {
     $out = Language::getDefault();
     if (isset($out)) {
         $this->stdout($out . "\n");
         return 0;
     }
     $this->stderr('Default language is not set' . "\n");
     return 1;
 }
예제 #2
0
 public function init()
 {
     \Yii::$app->language = Language::getDefault();
     $this->languages = Language::enabled();
     parent::init();
 }