protected function getLocaleDisplayName(Locale $locale) { $name = $locale->getLanguageText(); foreach ($this->getLocales() as $otherLocale) { if ($otherLocale->getSiteLocaleID() != $locale->getSiteLocaleID() && $otherLocale->getLanguage() == $locale->getLanguage()) { $name = sprintf('%s (%s)', $locale->getLanguageText(), $this->countries->getCountryName($locale->getCountry())); } } return $name; }
public function getLanguage() { return $this->locale->getLanguage(); }