29 private $allowedCurrencies;
37 $this->allowedCurrencies =
$localeConfig->getAllowedCurrencies();
48 $zones = \DateTimeZone::listIdentifiers(\DateTimeZone::ALL);
50 foreach ($zones as
$code) {
51 $list[
$code] = \IntlTimeZone::createTimeZone(
$code)->getDisplayName(
53 \IntlTimeZone::DISPLAY_LONG,
55 ) .
' (' .
$code .
')';
75 $isAllowedCurrency = array_search(
$code, $this->allowedCurrencies) !==
false;
76 if (!$isAllowedCurrency) {
94 $locales = \ResourceBundle::getLocales(
'') ?: [];
97 if (!in_array($locale, $this->allowedLocales)) {
100 $language = \Locale::getPrimaryLanguage($locale);
101 $country = \Locale::getRegion($locale);
102 if (!$languages[$language] || !$countries[$country]) {
105 $list[$locale] = $languages[$language] .
' (' . $countries[$country] .
')';
__construct(ConfigInterface $localeConfig)
getTimezoneList($doSort=true)