diff --git a/src/Illuminate/Translation/Translator.php b/src/Illuminate/Translation/Translator.php index 2a956830df98..7c836105ebab 100755 --- a/src/Illuminate/Translation/Translator.php +++ b/src/Illuminate/Translation/Translator.php @@ -191,7 +191,7 @@ public function get($key, array $replace = [], $locale = null, $fallback = true) public function choice($key, $number, array $replace = [], $locale = null) { $line = $this->get( - $key, $replace, $locale = $this->localeForChoice($locale) + $key, $replace, $locale = $this->localeForChoice($key, $locale) ); // If the given "number" is actually an array or countable we will simply count the @@ -211,12 +211,21 @@ public function choice($key, $number, array $replace = [], $locale = null) /** * Get the proper locale for a choice operation. * + * @param string $key * @param string|null $locale * @return string */ - protected function localeForChoice($locale) + protected function localeForChoice($key, $locale) { - return $locale ?: $this->locale ?: $this->fallback; + if ($locale && $this->hasForLocale($key, $locale)) { + return $locale; + } + + if ($this->hasForLocale($key, $this->locale)) { + return $this->locale; + } + + return $this->fallback; } /**