8000 bug #23250 [Translation] return fallback locales whenever possible (x… · symfony/symfony@9a0d342 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a0d342

Browse files
committed
bug #23250 [Translation] return fallback locales whenever possible (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [Translation] return fallback locales whenever possible | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23248 | License | MIT | Doc PR | Commits ------- 3c21650 return fallback locales whenever possible
2 parents 6e75cee + 3c21650 commit 9a0d342

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Translation/DataCollectorTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getCatalogue($locale = null)
9595
*/
9696
public function getFallbackLocales()
9797
{
98-
if ($this->translator instanceof Translator) {
98+
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
9999
return $this->translator->getFallbackLocales();
100100
}
101101

src/Symfony/Component/Translation/LoggingTranslator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getCatalogue($locale = null)
9595
*/
9696
public function getFallbackLocales()
9797
{
98-
if ($this->translator instanceof Translator) {
98+
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
9999
return $this->translator->getFallbackLocales();
100100
}
101101

0 commit comments

Comments
 (0)
0