src/php/main/Eix/Core/Requests/Http.php
public function getLocale()
    {
        // Use the intl extension if present.
        if (class_exists('\Locale')) {
            $locale = \Locale::acceptFromHttp(@$_SERVER['HTTP_ACCEPT_LANGUAGE']);
        }

        // If no locale was obtained, resort to the default one.
        if (empty($locale)) {
            $locale = Application::getSettings()->locale->default;
        }

        return $locale;
    }
public function getLocale()
    {
        // Use the intl extension if present.
        if (class_exists('\Locale')) {
            $locale = \Locale::acceptFromHttp(@$_SERVER['HTTP_ACCEPT_LANGUAGE']);
        }

        // If no locale was obtained, resort to the default one.
        if (empty($locale)) {
            $locale = Application::getSettings()->locale->default;
        }

        return $locale;
    }
public function getLocale ( ) { // Use the intl extension if present. if ( class_exists ( '\Locale' ) ) { $ locale = \ Locale :: acceptFromHttp ( @ $ _SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] ) ; } // If no locale was obtained, resort to the default one. if ( empty ( $ locale ) ) { $ locale = Application :: getSettings ( ) -> locale -> default ; } return $ locale ; }
Finds out which locale the request would want for the response.
Finds out which locale the request would want for the response .