/** * Check if given locale exists. * * @param string $locale * @return bool */ private function hasLocale($locale) { if (array_key_exists($locale, $this->loadedLocales)) { return true; } return $this->source->hasLocale($locale); }