From 5a8644ee78b807699dae1b425c89d08a6abadfa3 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 7 May 2021 14:28:34 +1000 Subject: [PATCH] Fixes for translations --- app/Jobs/Entity/CreateEntityPdf.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Jobs/Entity/CreateEntityPdf.php b/app/Jobs/Entity/CreateEntityPdf.php index 79a479ac98..0677062273 100644 --- a/app/Jobs/Entity/CreateEntityPdf.php +++ b/app/Jobs/Entity/CreateEntityPdf.php @@ -91,8 +91,16 @@ class CreateEntityPdf implements ShouldQueue public function handle() { + /* Set the locale*/ App::setLocale($this->contact->preferredLocale()); + + /* Forget the singleton*/ App::forgetInstance('translator'); + + /* Init a new copy of the translator*/ + $t = app('translator'); + + /* Set customized translations _NOW_ */ Lang::replace(Ninja::transformTranslations($this->entity->client->getMergedSettings())); $this->entity->service()->deletePdf();