1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 16:31:33 +02:00

Cleanup for Custom Translations

This commit is contained in:
David Bomba 2020-08-11 11:13:49 +10:00
parent ab5dc13662
commit c29c6ba480

View File

@ -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'];