How to use the translation helper inside an event listener?

Hi,

I am using an event listener for the "FormSubmitted" event and want to return a translated error message. I tried to use the translation helper, without any success.

trans('t.unknown_error')

How can I return translated string for the current locale?

Thanks!

>>>>>>> Unanswered <<<<<<<
0 Replies
1 Follower