abstract class AbstractTranslationStrategy implements TranslationStrategyInterface (View source)

Properties

protected DocumentManagerInterface $dm
protected string $prefix Prefix to namespace properties or child nodes.

Methods

setPrefix(string $prefix)

Set the namespace alias for translation extra properties.

string
getTranslatedPropertyName(string $locale, string $propertyName)

Determine the locale specific property name.

string
getTranslatedPropertyNameAssoc(string $locale, array $mapping)

Determine the locale specific property names for an assoc property.

Details

__construct(DocumentManagerInterface $dm)

Parameters

DocumentManagerInterface $dm

setPrefix(string $prefix)

Set the namespace alias for translation extra properties.

Parameters

string $prefix

string getTranslatedPropertyName(string $locale, string $propertyName)

Determine the locale specific property name.

Parameters

string $locale
string $propertyName the untranslated property name

Return Value

string the property name with the translation namespace.

string getTranslatedPropertyNameAssoc(string $locale, array $mapping)

Determine the locale specific property names for an assoc property.

Parameters

string $locale
array $mapping the mapping for the property

Return Value

string the property name with the translation namespace.