public function negotiate(Request $request)
    {
        $this->request = $request;

        if ( ! is_null($locale = $this->getFromAcceptedLanguagesHeader()))
            return $locale;

        if ( ! is_null($locale = $this->getFromHttpAcceptedLanguagesServer()))
            return $locale;

        if ( ! is_null($locale = $this->getFromRemoteHostServer()))
            return $locale;

        // TODO: Adding negotiate form IP Address ??

        return $this->defaultLocale;
    }
public function negotiate(Request $request)
    {
        $this->request = $request;

        if ( ! is_null($locale = $this->getFromAcceptedLanguagesHeader()))
            return $locale;

        if ( ! is_null($locale = $this->getFromHttpAcceptedLanguagesServer()))
            return $locale;

        if ( ! is_null($locale = $this->getFromRemoteHostServer()))
            return $locale;

        // TODO: Adding negotiate form IP Address ??

        return $this->defaultLocale;
    }
public function negotiate ( Request $ request ) { $ this -> request = $ request ; if ( ! is_null ( $ locale = $ this -> getFromAcceptedLanguagesHeader ( ) ) ) return $ locale ; if ( ! is_null ( $ locale = $ this -> getFromHttpAcceptedLanguagesServer ( ) ) ) return $ locale ; if ( ! is_null ( $ locale = $ this -> getFromRemoteHostServer ( ) ) ) return $ locale ; // TODO: Adding negotiate form IP Address ?? return $ this -> defaultLocale ; }
Negotiate the request.

@param  \Illuminate\Http\Request  $request

@return string
Negotiate the request .