Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 20380f9

Browse filesBrowse files
gmponosfabpot
authored andcommitted
Update LoggingTranslator to log the change of a locale
1 parent fba11b4 commit 20380f9
Copy full SHA for 20380f9

File tree

1 file changed

+2
-0
lines changed
Filter options

1 file changed

+2
-0
lines changed

‎src/Symfony/Component/Translation/LoggingTranslator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/LoggingTranslator.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,9 @@ public function transChoice($id, $number, array $parameters = [], $domain = null
8282
*/
8383
public function setLocale($locale)
8484
{
85+
$prev = $this->translator->getLocale();
8586
$this->translator->setLocale($locale);
87+
$this->logger->debug(sprintf('The locale of the translator has changed from "%s" to "%s".', $prev, $locale));
8688
}
8789

8890
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.