Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Mime] AddTemplatedEmail::locale() to set the locale for the email rendering#51690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranzalexander-schranz commentedSep 18, 2023
edited
Loading

QA
Branch?6.4
Bug fix?no
New feature?yes
Deprecations?no
TicketsFix #...
LicenseMIT
Doc PRsymfony/symfony-docs#...

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

$email = (newTemplatedEmail())    ->to('fabien@symfony.com')    ->from('helene@symfony.com')    ->subject('Hallo!')    ->locale('de')    ->textTemplate('email.txt.twig')    ->htmlTemplate('email.html.twig')    ->context($context);

OskarStark reacted with thumbs up emoji
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM.
Please just add a line in the changelog of the bridge.

@nicolas-grekasnicolas-grekas changed the title[TwigBridge][Mime] Add LocaleSwitcher to TemplatedEmail BodyRenderer[TwigBridge][Mime] AddTemplatedEmail::locale() to set the locale for the email renderingSep 19, 2023
@nicolas-grekas
Copy link
Member

ah, can you please check tests?

@nicolas-grekas
Copy link
Member

tests still :)

alexander-schranz reacted with eyes emoji

@nicolas-grekasnicolas-grekas added this to the6.4 milestoneSep 25, 2023
@carsonbotcarsonbot changed the title[TwigBridge][Mime] AddTemplatedEmail::locale() to set the locale for the email rendering[Mime] AddTemplatedEmail::locale() to set the locale for the email renderingSep 25, 2023
@fabpotfabpotforce-pushed thefeature/local-switcher-templated-emails branch from78e582e tod912384CompareOctober 1, 2023 08:40
@fabpot
Copy link
Member

Thank you@alexander-schranz.

@fabpotfabpot merged commitdecb566 intosymfony:6.4Oct 1, 2023
This was referencedOct 21, 2023
@alexander-schranzalexander-schranz deleted the feature/local-switcher-templated-emails branchFebruary 29, 2024 11:53
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@ycerutoycerutoAwaiting requested review from ycerutoyceruto is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

4 participants
@alexander-schranz@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp