Commit 57d74eb0 authored by Fabien Potencier's avatar Fabien Potencier

fixed translator

As of Symfony 2.5.2, Translator::__construct() calls setLocale.
As the Silex Translator calls it with null and because we synchronize
the translator language with the app one, the locale was always
set to null when calling the translator for the first time, overriding
the current app locale.
parent 49f63fd0
......@@ -37,6 +37,10 @@ class Translator extends BaseTranslator
public function setLocale($locale)
{
if (null === $locale) {
return;
}
$this->app['locale'] = $locale;
parent::setLocale($locale);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment