Neos\FluidAdaptor\Core\ViewHelper\AbstractLocaleAwareViewHelper::getLocale PHP Метод

getLocale() защищенный Метод

Get the locale to use for all locale specific functionality.
protected getLocale ( ) : Locale
Результат Neos\Flow\I18n\Locale The locale to use or NULL if locale should not be used
    protected function getLocale()
    {
        if (!$this->hasArgument('forceLocale')) {
            return null;
        }
        $forceLocale = $this->arguments['forceLocale'];
        $useLocale = null;
        if ($forceLocale instanceof I18n\Locale) {
            $useLocale = $forceLocale;
        } elseif (is_string($forceLocale)) {
            try {
                $useLocale = new I18n\Locale($forceLocale);
            } catch (I18n\Exception $exception) {
                throw new InvalidVariableException('"' . $forceLocale . '" is not a valid locale identifier.', 1342610148, $exception);
            }
        } elseif ($forceLocale === true) {
            $useLocale = $this->localizationService->getConfiguration()->getCurrentLocale();
        }
        return $useLocale;
    }