From aeffc46cfda9d76869e477c286fef99a6494f364 Mon Sep 17 00:00:00 2001 From: Jeroen Dalsem Date: Thu, 14 Nov 2024 15:05:41 +0100 Subject: [PATCH] fixed: notification on waitinglist promotion respects recipient language --- classes/Event.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/Event.php b/classes/Event.php index 49e3ddf..c69d962 100644 --- a/classes/Event.php +++ b/classes/Event.php @@ -996,6 +996,9 @@ public function generateNewAttendee(): bool { } $this->rsvp(EVENT_MANAGER_RELATION_ATTENDING, $waiting_user->guid, false, false, false); + + $current_language = elgg_get_current_language(); + elgg()->translator->setCurrentLanguage($waiting_user->getLanguage()); $notification_body = elgg_echo('event_manager:event:registration:notification:user:text:event_spotfree', [ $this->getDisplayName(), @@ -1016,6 +1019,8 @@ public function generateNewAttendee(): bool { } notify_user($waiting_user->guid, $this->owner_guid, elgg_echo('event_manager:event:registration:notification:user:subject'), $notification_body); + + elgg()->translator->setCurrentLanguage($current_language); return true; }