protected function isKeyALocale($key) { $locales = $this->getLocales(); return in_array($key, $locales); }