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;
 }
示例#2
0
 public function getCountry()
 {
     return $this->locale->getCountry();
 }
示例#3
0
 public static function getLocaleFlagIcon(Locale $locale, $filePathOnly = false)
 {
     $icon = $locale->getCountry();
     return self::getFlagIcon($icon, $filePathOnly);
 }