Skip to content
This repository has been archived by the owner on Aug 18, 2018. It is now read-only.

Commit

Permalink
Fixed bug on Symfony language change call
Browse files Browse the repository at this point in the history
  • Loading branch information
shaggyz committed Nov 14, 2016
1 parent aa4376e commit d25e556
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Xinax/LaravelGettext/Translators/Symfony.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ protected function getTranslator()
return $this->createTranslator();
}

/**
* Set locale overload.
* Needed to re-build the catalogue when locale changes.
*
* @param $locale
* @return $this
*/
public function setLocale($locale)
{
parent::setLocale($locale);

$this->symfonyTranslator = $this->createTranslator();
return $this;
}

/**
* Creates a new translator instance
*
Expand Down

0 comments on commit d25e556

Please sign in to comment.