예제 #1
0
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;
}
예제 #2
0
 /**
  * Return if the locale is enabled
  *
  * @param $locale
  *
  * @return bool
  */
 protected function _isEnabledLocale($locale)
 {
     return in_array(normalize_locale_name($locale), get_enabled_locales());
 }