public function getTranslation($language = null)
    {
        $language = $language ?: $this->_currentLanguage;
        return $this->owner->hasOne($this->translationClassName, [$this->languageForeignKey => $this->_ownerPrimaryKey])
                        ->where([$this->languageField => $language]);
    }
public function getTranslation($language = null)
    {
        $language = $language ?: $this->_currentLanguage;
        return $this->owner->hasOne($this->translationClassName, [$this->languageForeignKey => $this->_ownerPrimaryKey])
                        ->where([$this->languageField => $language]);
    }
public function getTranslation ( $ language = null ) { $ language = $ language ? : $ this -> _currentLanguage ; return $ this -> owner -> hasOne ( $ this -> translationClassName , [ $ this -> languageForeignKey => $ this -> _ownerPrimaryKey ] ) -> where ( [ $ this -> languageField => $ language ] ) ; }
Relation to model translation
@param $language
@return ActiveQuery
Relation to model translation