Skip to content

Commit b5422d1

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 6178f97 + 394f4a3 commit b5422d1

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add `HttpClientInterface::withOptions()`
8+
* Add `TranslatorInterface::getLocale()`
89

910
2.3.0
1011
-----

Translation/TranslatorInterface.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
/**
1515
* @author Fabien Potencier <[email protected]>
16+
*
17+
* @method string getLocale() Returns the default locale
1618
*/
1719
interface TranslatorInterface
1820
{

Translation/TranslatorTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ public function setLocale(string $locale)
3232

3333
/**
3434
* {@inheritdoc}
35+
*
36+
* @return string
3537
*/
3638
public function getLocale()
3739
{

0 commit comments

Comments
 (0)