-
Notifications
You must be signed in to change notification settings - Fork 3
Translate a value
BowlOfSoup edited this page Sep 17, 2020
·
2 revisions
Add this use statement to the top of your class.
BowlOfSoup\NormalizerBundle\Annotation as Bos;
You have to combine the Translate annotation with a Normalize annotation.
/**
* @Bos\Normalize(group={"somegroup"}, name="automobile")
* @Bos\Translate(group={"translation"})
*/
private $propertyToBeNormalized
The translation needs to be present in Resources/translations/messages.en.xliff.
See Translate Annotations for custom options, like locale (language).