Arcanedev\Localization\Utilities\LocalesManager::getCurrentOrDefaultLocale PHP Method

getCurrentOrDefaultLocale() public method

Get current or default locale.
    public function getCurrentOrDefaultLocale()
    {
        // If we reached this point and isDefaultLocaleHiddenInUrl is true we have to assume we are routing
        // to a default locale route.
        if ($this->isDefaultLocaleHiddenInUrl()) {
            $this->setCurrentLocale($this->getDefaultLocale());
        }
        // But if isDefaultLocaleHiddenInUrl is false, we have to retrieve it from the browser...
        return $this->getCurrentLocale();
    }