We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a501b0 commit 5f878b5Copy full SHA for 5f878b5
framework/core/src/Mail/SetTranslatorLocaleForEmailTrait.php
@@ -21,7 +21,7 @@ trait SetTranslatorLocaleForEmailTrait
21
* Falls back to forum default if user not found or has no preference.
22
*/
23
protected function setTranslatorLocaleForEmail(
24
- TranslatorInterface&Translator $translator,
+ TranslatorInterface $translator,
25
SettingsRepositoryInterface $settings,
26
string $email
27
): void {
@@ -31,7 +31,8 @@ protected function setTranslatorLocaleForEmail(
31
$locale = $user
32
? ($user->getPreference('locale') ?? $settings->get('default_locale'))
33
: $settings->get('default_locale');
34
-
+
35
+ /** @var TranslatorInterface&Translator $translator */
36
$translator->setLocale($locale);
37
}
38
0 commit comments