diff --git a/lib/Mailer/NotificationMailer.php b/lib/Mailer/NotificationMailer.php index a9528291..c5b01a36 100644 --- a/lib/Mailer/NotificationMailer.php +++ b/lib/Mailer/NotificationMailer.php @@ -80,8 +80,8 @@ public function sendNotification(INotification $notification, $serverUrl, $email $emailMessage->setSubject($parsedSubject); - $htmlText = $this->getMailBody($parsedMessage, $notificationLink, 'mail/htmlmail'); - $plainText = $this->getMailBody($parsedMessage, $notificationLink, 'mail/plaintextmail'); + $htmlText = $this->getMailBody($parsedMessage, $notificationLink, 'mail/htmlmail', $language); + $plainText = $this->getMailBody($parsedMessage, $notificationLink, 'mail/plaintextmail', $language); $emailMessage->setPlainBody($plainText); $emailMessage->setHtmlBody($htmlText); @@ -127,8 +127,8 @@ public function willSendNotification(INotification $notification) { } } - private function getMailBody($message, $serverUrl, $targetTemplate) { - $tmpl = new Template('notifications', $targetTemplate, '', false); + private function getMailBody($message, $serverUrl, $targetTemplate, $languageCode) { + $tmpl = new Template('notifications', $targetTemplate, '', false, $languageCode); $tmpl->assign('message', $message); $tmpl->assign('serverUrl', $serverUrl); return $tmpl->fetchPage();