src/Extension/FluentExtension.php
public function LocaleInformation($locale = null)
    {
        // Check locale and get object
        if ($locale) {
            $localeObj = Locale::getByLocale($locale);
        } else {
            $localeObj = Locale::getDefault();
        }
        $locale = $localeObj->getLocale();

        // Check linking mode
        $linkingMode = $this->getLinkingMode($locale);

        // Check link
        $link = $this->LocaleLink($locale);

        // Store basic locale information
        return ArrayData::create([
            'Locale' => $locale,
            'LocaleRFC1766' => i18n::convert_rfc1766($locale),
            'URLSegment' => $localeObj->getURLSegment(),
            'Title' => $localeObj->getTitle(),
            'LanguageNative' => $localeObj->getNativeName(),
            'Language' => i18n::getData()->langFromLocale($locale),
            'Link' => $link,
            'AbsoluteLink' => $link ? Director::absoluteURL($link) : null,
            'LinkingMode' => $linkingMode
        ]);
    }
public function LocaleInformation($locale = null)
    {
        // Check locale and get object
        if ($locale) {
            $localeObj = Locale::getByLocale($locale);
        } else {
            $localeObj = Locale::getDefault();
        }
        $locale = $localeObj->getLocale();

        // Check linking mode
        $linkingMode = $this->getLinkingMode($locale);

        // Check link
        $link = $this->LocaleLink($locale);

        // Store basic locale information
        return ArrayData::create([
            'Locale' => $locale,
            'LocaleRFC1766' => i18n::convert_rfc1766($locale),
            'URLSegment' => $localeObj->getURLSegment(),
            'Title' => $localeObj->getTitle(),
            'LanguageNative' => $localeObj->getNativeName(),
            'Language' => i18n::getData()->langFromLocale($locale),
            'Link' => $link,
            'AbsoluteLink' => $link ? Director::absoluteURL($link) : null,
            'LinkingMode' => $linkingMode
        ]);
    }
public function LocaleInformation ( $ locale = null ) { // Check locale and get object if ( $ locale ) { $ localeObj = Locale :: getByLocale ( $ locale ) ; } else { $ localeObj = Locale :: getDefault ( ) ; } $ locale = $ localeObj -> getLocale ( ) ; // Check linking mode $ linkingMode = $ this -> getLinkingMode ( $ locale ) ; // Check link $ link = $ this -> LocaleLink ( $ locale ) ; // Store basic locale information return ArrayData :: create ( [ 'Locale' => $ locale , 'LocaleRFC1766' => i18n :: convert_rfc1766 ( $ locale ) , 'URLSegment' => $ localeObj -> getURLSegment ( ) , 'Title' => $ localeObj -> getTitle ( ) , 'LanguageNative' => $ localeObj -> getNativeName ( ) , 'Language' => i18n :: getData ( ) -> langFromLocale ( $ locale ) , 'Link' => $ link , 'AbsoluteLink' => $ link ? Director :: absoluteURL ( $ link ) : null , 'LinkingMode' => $ linkingMode ] ) ; }
Retrieves information about this object in the specified locale

@param string $locale The locale (code) information to request, or null to use the default locale
@return ArrayData Mapped list of locale properties
Retrieves information about this object in the specified locale