trait SetTranslatorLocaleForEmailTrait

Methods

void
setTranslatorLocaleForEmail(TranslatorInterface $translator, SettingsRepositoryInterface $settings, string $email)

Set the translator locale based on the user's preference for the given email.

Details

protected void setTranslatorLocaleForEmail(TranslatorInterface $translator, SettingsRepositoryInterface $settings, string $email)

Set the translator locale based on the user's preference for the given email.

Falls back to forum default if user not found or has no preference.

Parameters

TranslatorInterface $translator
SettingsRepositoryInterface $settings
string $email

Return Value

void