return fallback locales whenever possible

This commit is contained in:
Christian Flothmann 2017-06-21 13:02:23 +02:00
parent 6e75cee83e
commit 3c21650d9e
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter
*/
public function getFallbackLocales()
{
if ($this->translator instanceof Translator) {
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
return $this->translator->getFallbackLocales();
}

View File

@ -95,7 +95,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface
*/
public function getFallbackLocales()
{
if ($this->translator instanceof Translator) {
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
return $this->translator->getFallbackLocales();
}