public function getLocalizedRelation($fieldName, $strict = true)
    {
        $localizedField = $this->getLocalizedFieldName($fieldName);

        if ($strict) {
            return $this->owner->getRelation($localizedField);
        }

        // if not strict, check localized first and fallback to fieldname
        if ($value = $this->owner->getRelation($localizedField)) {
            return $value;
        }

        return $this->owner->getRelation($fieldName);
    }
public function getLocalizedRelation($fieldName, $strict = true)
    {
        $localizedField = $this->getLocalizedFieldName($fieldName);

        if ($strict) {
            return $this->owner->getRelation($localizedField);
        }

        // if not strict, check localized first and fallback to fieldname
        if ($value = $this->owner->getRelation($localizedField)) {
            return $value;
        }

        return $this->owner->getRelation($fieldName);
    }
public function getLocalizedRelation ( $ fieldName , $ strict = true ) { $ localizedField = $ this -> getLocalizedFieldName ( $ fieldName ) ; if ( $ strict ) { return $ this -> owner -> getRelation ( $ localizedField ) ; } // if not strict, check localized first and fallback to fieldname if ( $ value = $ this -> owner -> getRelation ( $ localizedField ) ) { return $ value ; } return $ this -> owner -> getRelation ( $ fieldName ) ; }
Get the localized object for a given relation.
@param string $fieldName the name of the field without any locale extension. Eg. "Title"
@param boolean $strict if false, this will fallback to the master version of the field!
Get the localized object for a given relation .