public function isDocumentTranslatable(ClassMetadata $metadata)
    {
        return !empty($metadata->translator)
            && is_string($metadata->translator)
            && count($metadata->translatableFields) !== 0;
    }
public function isDocumentTranslatable(ClassMetadata $metadata)
    {
        return !empty($metadata->translator)
            && is_string($metadata->translator)
            && count($metadata->translatableFields) !== 0;
    }
public function isDocumentTranslatable ( ClassMetadata $ metadata ) { return ! empty ( $ metadata -> translator ) && is_string ( $ metadata -> translator ) && count ( $ metadata -> translatableFields ) !== 0 ; }
Determine whether this document is translatable.

To be translatable, it needs a translation strategy and have at least
one translated field.

@param ClassMetadata $metadata the document meta data

@return bool
Determine whether this document is translatable .