Skip to content

Commit d2ba040

Browse files
feature #40554 [Contracts] Add TranslatorInterface::getLocale() (nicolas-grekas)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Contracts] Add `TranslatorInterface::getLocale()` | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | Fix #40380 | License | MIT | Doc PR | - As discussed in symfony/symfony#40380 Commits ------- 45d9a36794 [Contracts/Translation] Add `TranslatorInterface::getLocale()`
2 parents e18d991 + 01b6823 commit d2ba040

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Tests/DependencyInjection/Compiler/DataCollectorTranslatorPassTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,9 @@ class TranslatorWithTranslatorBag implements TranslatorInterface
111111
public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null): string
112112
{
113113
}
114+
115+
public function getLocale(): string
116+
{
117+
return 'en';
118+
}
114119
}

0 commit comments

Comments
 (0)