diff --git a/src/Translator.php b/src/Translator.php index 8a6a9b0..e32c0b2 100644 --- a/src/Translator.php +++ b/src/Translator.php @@ -260,10 +260,14 @@ public function getMessage(string $key, ?string $locale = null) $locales = [$locale ?: $this->locale]; + $message = null; + foreach ($locales as $locale) { $this->load($namespace, $group, $locale); - $message = $this->getLine($namespace, $group, $locale, $item); + if ($item !== null) { + $message = $this->getLine($namespace, $group, $locale, $item); + } if ($message !== null) { break;