diff --git a/mailer.rst b/mailer.rst index 8dc952f2fb9..9815cf3ca65 100644 --- a/mailer.rst +++ b/mailer.rst @@ -791,6 +791,9 @@ for Twig templates:: // path of the Twig template to render ->htmlTemplate('emails/signup.html.twig') + // change locale used in the template, e.g. to match user's locale + ->locale('de') + // pass variables (name => value) to the template ->context([ 'expiration_date' => new \DateTime('+7 days'), @@ -798,6 +801,11 @@ for Twig templates:: ]) ; +.. versionadded:: 6.4 + + The :method:`Symfony\\Bridge\\Twig\\Mime\\TemplatedEmail::locale` method + was introduced in Symfony 6.4. + Then, create the template: .. code-block:: html+twig
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: