Skip to content

Commit

Permalink
bug #23250 [Translation] return fallback locales whenever possible (x…
Browse files Browse the repository at this point in the history
…abbuh)

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
  • Loading branch information
fabpot committed Jun 21, 2017
2 parents 6e75cee + 3c21650 commit 9a0d342
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -95,7 +95,7 @@ public function getCatalogue($locale = null)
*/
public function getFallbackLocales()
{
if ($this->translator instanceof Translator) {
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
return $this->translator->getFallbackLocales();
}

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Translation/LoggingTranslator.php
Expand Up @@ -95,7 +95,7 @@ public function getCatalogue($locale = null)
*/
public function getFallbackLocales()
{
if ($this->translator instanceof Translator) {
if ($this->translator instanceof Translator || method_exists($this->translator, 'getFallbackLocales')) {
return $this->translator->getFallbackLocales();
}

Expand Down

0 comments on commit 9a0d342

Please sign in to comment.