8000 return fallback locales whenever possible · symfony/symfony@3c21650 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3c21650

Browse files
committed
return fallback locales whenever possible
1 parent 6e75cee commit 3c21650

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