Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#1821 from vnagara/fix/…
Browse files Browse the repository at this point in the history
…fix_translator_fallback_locales_

fix fallback locales setter/getter.
  • Loading branch information
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Translator/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public function getLocale()
*/
public function setFallbackLocale($locale)
{
$this->locale = $locale;
$this->fallbackLocale= $locale;
return $this;
}

Expand All @@ -229,11 +229,11 @@ public function setFallbackLocale($locale)
*/
public function getFallbackLocale()
{
if ($this->locale === null) {
$this->locale = Locale::getDefault();
if ($this->fallbackLocale === null) {
$this->fallbackLocale = Locale::getDefault();
}

return $this->locale;
return $this->fallbackLocale;
}

/**
Expand Down

0 comments on commit 68cc4b3

Please sign in to comment.