original_string: public function localized($language = null)
      {
          if (!$language){
              $language = Yii::$app->language;
          }
              
          if (!isset($this->with['translations'])) {
              $this->with(['translation' => function ($query) use ($language) {
                  $query->where([$this->languageField => $language]);
              }]);
          }
  
          return $this;
      }
code: public function localized($language = null)
      {
          if (!$language){
              $language = Yii::$app->language;
          }
              
          if (!isset($this->with['translations'])) {
              $this->with(['translation' => function ($query) use ($language) {
                  $query->where([$this->languageField => $language]);
              }]);
          }
  
          return $this;
      }
code_tokens: public function localized ( $ language = null ) { if ( ! $ language ) { $ language = Yii :: $ app -> language ; } if ( ! isset ( $ this -> with [ 'translations' ] ) ) { $ this -> with ( [ 'translation' => function ( $ query ) use ( $ language ) { $ query -> where ( [ $ this -> languageField => $ language ] ) ; } ] ) ; } return $ this ; }
docstring: Scope for querying by languages.
  
  @param $language
  @param $abridge
  @return $this
docstring_tokens: Scope for querying by languages .