TranslateableBehavior.php
private function populateTranslations()
    {
        //translations
        $aRelated = $this->owner->getRelatedRecords();
        if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {
            if (is_array($aRelated[$this->relation])) {
                foreach ($aRelated[$this->relation] as $model) {
                    $this->_models[$model->getAttribute($this->languageField)] = $model;
                }
            } else {
                $model = $aRelated[$this->relation];
                $this->_models[$model->getAttribute($this->languageField)] = $model;
            }
        }
    }
private function populateTranslations()
    {
        //translations
        $aRelated = $this->owner->getRelatedRecords();
        if (isset($aRelated[$this->relation]) && $aRelated[$this->relation] != null) {
            if (is_array($aRelated[$this->relation])) {
                foreach ($aRelated[$this->relation] as $model) {
                    $this->_models[$model->getAttribute($this->languageField)] = $model;
                }
            } else {
                $model = $aRelated[$this->relation];
                $this->_models[$model->getAttribute($this->languageField)] = $model;
            }
        }
    }
private function populateTranslations ( ) { //translations $ aRelated = $ this -> owner -> getRelatedRecords ( ) ; if ( isset ( $ aRelated [ $ this -> relation ] ) && $ aRelated [ $ this -> relation ] != null ) { if ( is_array ( $ aRelated [ $ this -> relation ] ) ) { foreach ( $ aRelated [ $ this -> relation ] as $ model ) { $ this -> _models [ $ model -> getAttribute ( $ this -> languageField ) ] = $ model ; } } else { $ model = $ aRelated [ $ this -> relation ] ; $ this -> _models [ $ model -> getAttribute ( $ this -> languageField ) ] = $ model ; } } }
Populates already loaded translations
Populates already loaded translations