diff --git a/app/Providers/NinjaTranslationServiceProvider.php b/app/Providers/NinjaTranslationServiceProvider.php index bf7d0c73243c..df58fcabc6fd 100644 --- a/app/Providers/NinjaTranslationServiceProvider.php +++ b/app/Providers/NinjaTranslationServiceProvider.php @@ -18,8 +18,21 @@ class NinjaTranslationServiceProvider extends TranslationServiceProvider { public function boot() { - //parent::boot(); + /** + * To reset the translator instance we call + * + * App::forgetInstance('translator'); + * + * Why? As the translator is a singleton it persists for its + * lifecycle + * + * We _must_ reset the singleton when shifting between + * clients/companies otherwise translations will + * persist. + * + */ + $this->app->singleton('translator', function($app) { $loader = $app['translation.loader'];