function get_locale_url_map() { static $map; if (!$map) { $map = array(); $config = \LandingPages\Mvc::getConfig()->getData(); foreach ($config as $key => $value) { if (preg_match('/^locale\\.url\\.map\\.(.*)$/', $key, $M)) { $map[$M[1]] = normalize_locale_name($value); } } } return $map; }
/** * Return if the locale is enabled * * @param $locale * * @return bool */ protected function _isEnabledLocale($locale) { return in_array(normalize_locale_name($locale), get_enabled_locales()); }