private function getFromAcceptedLanguagesHeader()
    {
        $matches = $this->getMatchesFromAcceptedLanguages();

        if ($locale = $this->inSupportedLocales($matches)) {
            return $locale;
        }

        // If any (i.e. "*") is acceptable, return the first supported locale
        if (isset($matches['*'])) {
            return $this->supportedLocales->first()->key();
        }

        return null;
    }
private function getFromAcceptedLanguagesHeader()
    {
        $matches = $this->getMatchesFromAcceptedLanguages();

        if ($locale = $this->inSupportedLocales($matches)) {
            return $locale;
        }

        // If any (i.e. "*") is acceptable, return the first supported locale
        if (isset($matches['*'])) {
            return $this->supportedLocales->first()->key();
        }

        return null;
    }
private function getFromAcceptedLanguagesHeader ( ) { $ matches = $ this -> getMatchesFromAcceptedLanguages ( ) ; if ( $ locale = $ this -> inSupportedLocales ( $ matches ) ) { return $ locale ; } // If any (i.e. "*") is acceptable, return the first supported locale if ( isset ( $ matches [ '*' ] ) ) { return $ this -> supportedLocales -> first ( ) -> key ( ) ; } return null ; }
Get locale from accepted languages header.

@return null|string
Get locale from accepted languages header .