Arcanedev\Localization\Utilities\LocalesManager::getCurrentOrDefaultLocale PHP Метод

getCurrentOrDefaultLocale() публичный Метод

Get current or default locale.
public getCurrentOrDefaultLocale ( ) : string
Результат string
    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();
    }