public function getTranslation($entity, $property, $locale)
    {
        $metadata = $this->metadataCollection->getMetadata($entity);
        if($metadata === null) {
            return null;
        }

        $property = $metadata->getProperty($property);
        if($property === null) {
            return null;
        }

        $strategy = $this->strategyResolver->getStrategy($property->getStrategy());
        return $strategy->getTranslation($entity, $property, $locale, $metadata);
    }
public function getTranslation($entity, $property, $locale)
    {
        $metadata = $this->metadataCollection->getMetadata($entity);
        if($metadata === null) {
            return null;
        }

        $property = $metadata->getProperty($property);
        if($property === null) {
            return null;
        }

        $strategy = $this->strategyResolver->getStrategy($property->getStrategy());
        return $strategy->getTranslation($entity, $property, $locale, $metadata);
    }
public function getTranslation ( $ entity , $ property , $ locale ) { $ metadata = $ this -> metadataCollection -> getMetadata ( $ entity ) ; if ( $ metadata === null ) { return null ; } $ property = $ metadata -> getProperty ( $ property ) ; if ( $ property === null ) { return null ; } $ strategy = $ this -> strategyResolver -> getStrategy ( $ property -> getStrategy ( ) ) ; return $ strategy -> getTranslation ( $ entity , $ property , $ locale , $ metadata ) ; }
Translate a single property of an entity.

@param $entity
@param $property
@param $locale
@return null
@throws \Exception
Translate a single property of an entity .