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
-------
3c21650d9e
return fallback locales whenever possible
This commit is contained in:
commit
9a0d342226
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue