rainlab/translate-plugin

setContext doesn't exist anymore, how can we change the language to send an email?

mariavilaro opened this issue · 2 comments

I have a plugin that sends emails to the users in their preferred language. The trigger is in the admin panel (the push of a button) or in a console command. Before October 3 I used the Translate plugin functionality to set the language before sending the email:
\RainLab\Translate\Models\Message::setContext($locale);
But now this method doesn't exist anymore, the email is always sent in the language of the current selected site. How could I send emails in other languages than the current one?

Just found the solution, will send a PR in a minute to solve this

Fixed by #735