src/Http/Middleware/SetLocale.php
protected function getValidSessionLocale()
    {
        $locale = $this->getSessionLocale();

        if ( ! $locale) {
            return false;
        }

        if ( ! $this->repository->isAvailable($locale)) {
            $locale = $this->repository->getDefault();
        }

        return $locale;
    }
protected function getValidSessionLocale()
    {
        $locale = $this->getSessionLocale();

        if ( ! $locale) {
            return false;
        }

        if ( ! $this->repository->isAvailable($locale)) {
            $locale = $this->repository->getDefault();
        }

        return $locale;
    }
protected function getValidSessionLocale ( ) { $ locale = $ this -> getSessionLocale ( ) ; if ( ! $ locale ) { return false ; } if ( ! $ this -> repository -> isAvailable ( $ locale ) ) { $ locale = $ this -> repository -> getDefault ( ) ; } return $ locale ; }
Returns the session locale, replacing unavailable with default.

@return bool|string
Returns the session locale replacing unavailable with default .