1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Set translator in email entity class

This commit is contained in:
David Bomba 2021-08-10 07:27:01 +10:00
parent ad7440bc84
commit 725e4092ce

View File

@ -107,7 +107,10 @@ class EmailEntity implements ShouldQueue
/* Set DB */
MultiDB::setDB($this->company->db);
App::forgetInstance('translator');
$t = app('translator');
App::setLocale($this->invitation->contact->preferredLocale());
$t->replace(Ninja::transformTranslations($this->settings));
$nmo = new NinjaMailerObject;
$nmo->mailable = new TemplateEmail($this->email_entity_builder, $this->invitation->contact, $this->invitation);