library/Garp/Application/Resource/Router.php
protected function _getRoutesConfig() {
        $options = $this->getOptions();

        if (!isset($options['routesFile'])) {
            throw new Exception(self::ERROR_NO_ROUTE_DEFINED);
        }

        $routes = $options['routesFile'];

        if (is_string($routes)) {
            $genericRoutes = $this->_loadRoutesConfig($routes);
        } else {
            $genericRoutes = array_key_exists('generic', $routes) ?
                $this->_loadRoutesConfig($routes['generic']) :
                array()
            ;
        }

        $lang = $this->_getCurrentLanguage();
        $territory = Garp_I18n::languageToTerritory($lang);
        $utf8_extension = PHP_OS === 'Linux' ? '.utf8' : '.UTF-8';
        setlocale(LC_ALL, $territory . $utf8_extension);

        /**
         * Fix for Turkish language lowercasing issues.
         *
         * @see: http://www.sobstel.org/blog/php-call-to-undefined-method-on-tr-tr-locale/
         * @see: https://bugs.php.net/bug.php?id=18556
         */
        if (in_array($territory, array('tr_TR', 'ku', 'az_AZ'))) {
            setlocale(LC_CTYPE, 'en_US' . $utf8_extension);
        }

        if ($this->_localeIsEnabled() && $lang && isset($options['routesFile'][$lang])) {
            $langFile = $options['routesFile'][$lang];
            $langRoutes = $this->_loadRoutesConfig($langFile);

            return $genericRoutes->merge($langRoutes);
        }

        return $genericRoutes;
    }
protected function _getRoutesConfig() {
        $options = $this->getOptions();

        if (!isset($options['routesFile'])) {
            throw new Exception(self::ERROR_NO_ROUTE_DEFINED);
        }

        $routes = $options['routesFile'];

        if (is_string($routes)) {
            $genericRoutes = $this->_loadRoutesConfig($routes);
        } else {
            $genericRoutes = array_key_exists('generic', $routes) ?
                $this->_loadRoutesConfig($routes['generic']) :
                array()
            ;
        }

        $lang = $this->_getCurrentLanguage();
        $territory = Garp_I18n::languageToTerritory($lang);
        $utf8_extension = PHP_OS === 'Linux' ? '.utf8' : '.UTF-8';
        setlocale(LC_ALL, $territory . $utf8_extension);

        /**
         * Fix for Turkish language lowercasing issues.
         *
         * @see: http://www.sobstel.org/blog/php-call-to-undefined-method-on-tr-tr-locale/
         * @see: https://bugs.php.net/bug.php?id=18556
         */
        if (in_array($territory, array('tr_TR', 'ku', 'az_AZ'))) {
            setlocale(LC_CTYPE, 'en_US' . $utf8_extension);
        }

        if ($this->_localeIsEnabled() && $lang && isset($options['routesFile'][$lang])) {
            $langFile = $options['routesFile'][$lang];
            $langRoutes = $this->_loadRoutesConfig($langFile);

            return $genericRoutes->merge($langRoutes);
        }

        return $genericRoutes;
    }
protected function _getRoutesConfig ( ) { $ options = $ this -> getOptions ( ) ; if ( ! isset ( $ options [ 'routesFile' ] ) ) { throw new Exception ( self :: ERROR_NO_ROUTE_DEFINED ) ; } $ routes = $ options [ 'routesFile' ] ; if ( is_string ( $ routes ) ) { $ genericRoutes = $ this -> _loadRoutesConfig ( $ routes ) ; } else { $ genericRoutes = array_key_exists ( 'generic' , $ routes ) ? $ this -> _loadRoutesConfig ( $ routes [ 'generic' ] ) : array ( ) ; } $ lang = $ this -> _getCurrentLanguage ( ) ; $ territory = Garp_I18n :: languageToTerritory ( $ lang ) ; $ utf8_extension = PHP_OS === 'Linux' ? '.utf8' : '.UTF-8' ; setlocale ( LC_ALL , $ territory . $ utf8_extension ) ; /**
         * Fix for Turkish language lowercasing issues.
         *
         * @see: http://www.sobstel.org/blog/php-call-to-undefined-method-on-tr-tr-locale/
         * @see: https://bugs.php.net/bug.php?id=18556
         */ if ( in_array ( $ territory , array ( 'tr_TR' , 'ku' , 'az_AZ' ) ) ) { setlocale ( LC_CTYPE , 'en_US' . $ utf8_extension ) ; } if ( $ this -> _localeIsEnabled ( ) && $ lang && isset ( $ options [ 'routesFile' ] [ $ lang ] ) ) { $ langFile = $ options [ 'routesFile' ] [ $ lang ] ; $ langRoutes = $ this -> _loadRoutesConfig ( $ langFile ) ; return $ genericRoutes -> merge ( $ langRoutes ) ; } return $ genericRoutes ; }
Retrieve a routes.ini file containing routes

@return Zend_Config_Ini
Retrieve a routes . ini file containing routes