src/Http/Controllers/PublicController.php
private function getBrowserLanguageOrDefault()
    {
        if ($browserLanguage = getenv('HTTP_ACCEPT_LANGUAGE')) {
            $browserLocale = substr($browserLanguage, 0, 2);
            if (in_array($browserLocale, TypiCMS::enabledLocales())) {
                return $browserLocale;
            }
        }

        return config('app.locale');
    }
private function getBrowserLanguageOrDefault()
    {
        if ($browserLanguage = getenv('HTTP_ACCEPT_LANGUAGE')) {
            $browserLocale = substr($browserLanguage, 0, 2);
            if (in_array($browserLocale, TypiCMS::enabledLocales())) {
                return $browserLocale;
            }
        }

        return config('app.locale');
    }
private function getBrowserLanguageOrDefault ( ) { if ( $ browserLanguage = getenv ( 'HTTP_ACCEPT_LANGUAGE' ) ) { $ browserLocale = substr ( $ browserLanguage , 0 , 2 ) ; if ( in_array ( $ browserLocale , TypiCMS :: enabledLocales ( ) ) ) { return $ browserLocale ; } } return config ( 'app.locale' ) ; }
Get browser language or app.locale.

@return string
Get browser language or app . locale .