src/Versatile/Introspection/EloquentTitleIntrospector.php
public function keyTitle($class, $path)
    {

        // Allows manual overwrites if titles
        if ($title = $this->getManualKeyTitle($this->getClassName($class),$path)) {
            return $title;
        }

        try{

            // First check if path is a related key (account.owner.id)
            if ($this->parser->isRelatedKey($path)) {

                list($join, $key) = $this->parser->toJoinAndKey($path);
                $className = $this->pathIntrospector->classOfPath($class, $join);

            } else { // No related key

                $className = $this->getClassName($class);
                $key = $path;

            }

            if ($title = $this->getManualKeyTitle($className, $key)) {
                return $title;
            }

            $langKey = $this->key2QualifiedLangKey($className, $key);
            $title = $this->translator->get($langKey);

            // If a translation was found return it
            if($title != $langKey){
                return $title;
            }

        }
        catch(UnexpectedValueException $e){
            return $path;
        }

        // If no translation was found try to return an object title
        // (e.g. $class=User, $key=address if address is an object
        try{
            return $this->objectTitle($this->pathIntrospector->classOfPath($class, $path));
        }
        catch(UnexpectedValueException $e){
            return $path;
        }

        return $title;
    }
public function keyTitle($class, $path)
    {

        // Allows manual overwrites if titles
        if ($title = $this->getManualKeyTitle($this->getClassName($class),$path)) {
            return $title;
        }

        try{

            // First check if path is a related key (account.owner.id)
            if ($this->parser->isRelatedKey($path)) {

                list($join, $key) = $this->parser->toJoinAndKey($path);
                $className = $this->pathIntrospector->classOfPath($class, $join);

            } else { // No related key

                $className = $this->getClassName($class);
                $key = $path;

            }

            if ($title = $this->getManualKeyTitle($className, $key)) {
                return $title;
            }

            $langKey = $this->key2QualifiedLangKey($className, $key);
            $title = $this->translator->get($langKey);

            // If a translation was found return it
            if($title != $langKey){
                return $title;
            }

        }
        catch(UnexpectedValueException $e){
            return $path;
        }

        // If no translation was found try to return an object title
        // (e.g. $class=User, $key=address if address is an object
        try{
            return $this->objectTitle($this->pathIntrospector->classOfPath($class, $path));
        }
        catch(UnexpectedValueException $e){
            return $path;
        }

        return $title;
    }
{@inheritdoc}

@param string|object $class The class or an object of it
@param string $key A key name. Can be dotted like address.street.name
@return string The readable title