src/Cms/AbstractWebTemplate.php
public function currentLocale()
    {
        $langCode = $this->translator()->getLocale();
        $locales  = $this->translator()->locales();
        if (isset($locales[$langCode])) {
            $locale = $locales[$langCode];
            if (isset($locale['locale'])) {
                return $locale['locale'];
            } else {
                return $langCode;
            }
        }

        return null;
    }
public function currentLocale()
    {
        $langCode = $this->translator()->getLocale();
        $locales  = $this->translator()->locales();
        if (isset($locales[$langCode])) {
            $locale = $locales[$langCode];
            if (isset($locale['locale'])) {
                return $locale['locale'];
            } else {
                return $langCode;
            }
        }

        return null;
    }
public function currentLocale ( ) { $ langCode = $ this -> translator ( ) -> getLocale ( ) ; $ locales = $ this -> translator ( ) -> locales ( ) ; if ( isset ( $ locales [ $ langCode ] ) ) { $ locale = $ locales [ $ langCode ] ; if ( isset ( $ locale [ 'locale' ] ) ) { return $ locale [ 'locale' ] ; } else { return $ langCode ; } } return null ; }
Retrieve the current locale.

@return string|null
Retrieve the current locale .