-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #51690 [Mime] Add
TemplatedEmail::locale()
to set the local…
…e for the email rendering (alexander-schranz) This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Mime] Add `TemplatedEmail::locale()` to set the locale for the email rendering | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> Add LocaleSwitcher to TemplatedEmail BodyRenderer. Currently it is not possible to render a twig template or a converter in a specific locale context. It is common to send the email in the language of the receiver. ### Usage ```php $email = (new TemplatedEmail()) ->to('fabien@symfony.com') ->from('helene@symfony.com') ->subject('Hallo!') ->locale('de') ->textTemplate('email.txt.twig') ->htmlTemplate('email.html.twig') ->context($context) ; ``` Commits ------- d912384 [Mime] Add `TemplatedEmail::locale()` to set the locale for the email rendering
- Loading branch information
Showing
7 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters