TranslateableBehavior.php
private function modelEqualsFallbackTranslation($model, $language)
    {
        $fallbackLanguage = $this->getFallbackLanguage($language);
        foreach($this->translationAttributes as $translationAttribute) {
            if (isset($model->$translationAttribute)) {
                list($translation, $transLanguage) = $this->getAttributeTranslation($translationAttribute, $fallbackLanguage);
                if ($transLanguage === $language || $model->$translationAttribute !== $translation) {
                    return false;
                }
            }
        }
        return true;
    }
private function modelEqualsFallbackTranslation($model, $language)
    {
        $fallbackLanguage = $this->getFallbackLanguage($language);
        foreach($this->translationAttributes as $translationAttribute) {
            if (isset($model->$translationAttribute)) {
                list($translation, $transLanguage) = $this->getAttributeTranslation($translationAttribute, $fallbackLanguage);
                if ($transLanguage === $language || $model->$translationAttribute !== $translation) {
                    return false;
                }
            }
        }
        return true;
    }
private function modelEqualsFallbackTranslation ( $ model , $ language ) { $ fallbackLanguage = $ this -> getFallbackLanguage ( $ language ) ; foreach ( $ this -> translationAttributes as $ translationAttribute ) { if ( isset ( $ model -> $ translationAttribute ) ) { list ( $ translation , $ transLanguage ) = $ this -> getAttributeTranslation ( $ translationAttribute , $ fallbackLanguage ) ; if ( $ transLanguage === $ language || $ model -> $ translationAttribute !== $ translation ) { return false ; } } } return true ; }
Check whether translation model has relevant translation data.

This will return false if any translation is set and different from
the fallback.

This method is used to only store translations if they differ from the fallback.

@param ActiveRecord $model
@param string $language
@return bool whether a translation model contains relevant translation data.
Check whether translation model has relevant translation data .