From ee660e8dae7f66829effd874ff2da115e679397f Mon Sep 17 00:00:00 2001 From: Ahmed Sayed Date: Fri, 4 Sep 2020 15:24:42 +0200 Subject: [PATCH] fallback to fallback_locale translation when requested translation line is empty (#34136) --- Translator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translator.php b/Translator.php index 0f1606e..46611b6 100755 --- a/Translator.php +++ b/Translator.php @@ -122,7 +122,7 @@ public function get($key, array $replace = [], $locale = null, $fallback = true) $locales = $fallback ? $this->localeArray($locale) : [$locale]; foreach ($locales as $locale) { - if (! is_null($line = $this->getLine( + if (! empty($line = $this->getLine( $namespace, $group, $locale, $item, $replace ))) { return $line ?? $key;