diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-08 12:48:08 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-09-09 12:11:12 +0200 |
commit | 222c9fed7d4ca2b3b44c05907fbb7080c1efd342 (patch) | |
tree | 62b1bfa9233000985331b9dea703d51dc24515a2 /includes/helper/email_helper.php | |
parent | 2d6bca1357faff28bc1f86a56b432cc463ff7574 (diff) | |
parent | 8257864829ffdfb410f05e0dd0a9c781f48b741a (diff) |
Merge remote-tracking branch 'MyIgel/templating'
Diffstat (limited to 'includes/helper/email_helper.php')
-rw-r--r-- | includes/helper/email_helper.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/helper/email_helper.php b/includes/helper/email_helper.php index c223d026..8d1cb794 100644 --- a/includes/helper/email_helper.php +++ b/includes/helper/email_helper.php @@ -15,14 +15,16 @@ function engelsystem_email_to_user($recipient_user, $title, $message, $not_if_it return true; } - gettext_locale($recipient_user['Sprache']); + /** @var \Engelsystem\Helpers\Translator $translator */ + $translator = app()->get('translator'); + $locale = $translator->getLocale(); + $translator->setLocale($recipient_user['Sprache']); $message = sprintf(_('Hi %s,'), $recipient_user['Nick']) . "\n\n" . _('here is a message for you from the engelsystem:') . "\n\n" . $message . "\n\n" . _('This email is autogenerated and has not been signed. You got this email because you are registered in the engelsystem.'); - - gettext_locale(); + $translator->setLocale($locale); return engelsystem_email($recipient_user['email'], $title, $message); } |