8000 Call the internal translator setLocale even if the locale is the same. · symfony/symfony@830e241 · GitHub
[go: up one dir, main page]

Skip to content

Commit 830e241

Browse files
authored
Call the internal translator setLocale even if the locale is the same.
1 parent b880dc7 commit 830e241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Translation/LoggingTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ public function transChoice($id, $number, array $parameters = [], $domain = null
8383
public function setLocale($locale)
8484
{
8585
$prev = $this->translator->getLocale();
86+
$this->translator->setLocale($locale);
8687
if ($prev === $locale) {
8788
return;
8889
}
8990

90-
$this->translator->setLocale($locale);
9191
$this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale));
9292
}
9393

0 commit comments

Comments
 (0)
0