SiteLanguage
Entity representing a site_language configuration of a site object.
Table of Contents
Properties
- $base : UriInterface
- The Base URL for this language
- $configuration : array<string|int, mixed>
- Additional parameters configured for this site language
- $direction : string
- The direction for this language
- $enabled : bool
- $fallbackLanguageIds : array<string|int, mixed>
- $fallbackType : string
- $flagIdentifier : string
- The flag key (like "gb" or "fr") used to be used in TYPO3's Backend.
- $hreflang : string
- Language tag for this language defined by RFC 1766 / 3066 for "hreflang" attribute
- $languageId : int
- The language id.
- $locale : Locale
- Locale, like 'de-CH' or 'en-GB'
- $navigationTitle : string
- Label to be used within language menus
- $title : string
- Label to be used within TYPO3 to identify the language
- $twoLetterIsoCode : string
- The iso code for this language (two letter) ISO-639-1
- $typo3Language : string
- Prefix for TYPO3's language files. If empty, this is fetched from $locale
- $websiteTitle : string
- Localized title of the site to be used in title tag.
Methods
- __construct() : mixed
- SiteLanguage constructor.
- enabled() : bool
- Returns true if the language is available in frontend usage
- getBase() : UriInterface
- getDirection() : string
- Returns the language direction
- getFallbackLanguageIds() : array<string|int, mixed>
- getFallbackType() : string
- getFlagIdentifier() : string
- getHreflang() : string
- Returns the RFC 1766 / 3066 language tag for hreflang tags
- getLanguageId() : int
- getLocale() : Locale
- getNavigationTitle() : string
- getTitle() : string
- getTwoLetterIsoCode() : string
- Returns the ISO-639-1 language ISO code
- getTypo3Language() : string
- Returns the XLF label language key, returns "default" when it is "en".
- getWebsiteTitle() : string
- hasCustomTypo3Language() : bool
- isEnabled() : bool
- Helper so fluid can work with this as well.
- toArray() : array<string|int, mixed>
- Returns the SiteLanguage in an array representation for e.g. the usage in TypoScript.
Properties
$base
The Base URL for this language
        protected
            UriInterface
    $base
    
    
    
    
    
    
$configuration
Additional parameters configured for this site language
        protected
            array<string|int, mixed>
    $configuration
     = []
    
    
    
    
    
$direction
The direction for this language
in favor of $this->locale->isRightToLeftLanguageDirection()
        protected
            string
    $direction
     = ''
    
    
    
    
    
$enabled
        protected
            bool
    $enabled
     = true
    
    
    
    
    
$fallbackLanguageIds
        protected
            array<string|int, mixed>
    $fallbackLanguageIds
     = []
    
    
    
    
    
$fallbackType
        protected
            string
    $fallbackType
     = 'strict'
    
    
    
    
    
$flagIdentifier
The flag key (like "gb" or "fr") used to be used in TYPO3's Backend.
        protected
            string
    $flagIdentifier
     = ''
    
    
    
    
    
$hreflang
Language tag for this language defined by RFC 1766 / 3066 for "hreflang" attribute
        protected
            string
    $hreflang
     = ''
    
    
    
    
    
$languageId
The language id.
        protected
            int
    $languageId
    
    
    
    
    
    
$locale
Locale, like 'de-CH' or 'en-GB'
        protected
            Locale
    $locale
    
    
    
    
    
    
$navigationTitle
Label to be used within language menus
        protected
            string
    $navigationTitle
     = ''
    
    
    
    
    
$title
Label to be used within TYPO3 to identify the language
        protected
            string
    $title
     = 'Default'
    
    
    
    
    
$twoLetterIsoCode
The iso code for this language (two letter) ISO-639-1
in favor of $this->locale->getLanguageCode()
        protected
            string
    $twoLetterIsoCode
     = ''
    
    
    
    
    
$typo3Language
Prefix for TYPO3's language files. If empty, this is fetched from $locale
        protected
            string
    $typo3Language
     = ''
    
    
    
    
    
$websiteTitle
Localized title of the site to be used in title tag.
        protected
            string
    $websiteTitle
     = ''
    
    
    
    
    
Methods
__construct()
SiteLanguage constructor.
    public
                    __construct(int $languageId, string $locale, UriInterface $base, array<string|int, mixed> $configuration) : mixed
    Parameters
- $languageId : int
- $locale : string
- $base : UriInterface
- $configuration : array<string|int, mixed>
enabled()
Returns true if the language is available in frontend usage
    public
                    enabled() : bool
    Return values
boolgetBase()
    public
                    getBase() : UriInterface
    Return values
UriInterfacegetDirection()
Returns the language direction
    public
                    getDirection() : string
    in favor of $this->locale->isRightToLeftLanguageDirection()
Return values
stringgetFallbackLanguageIds()
    public
                    getFallbackLanguageIds() : array<string|int, mixed>
    Return values
array<string|int, mixed>getFallbackType()
    public
                    getFallbackType() : string
    Return values
stringgetFlagIdentifier()
    public
                    getFlagIdentifier() : string
    Return values
stringgetHreflang()
Returns the RFC 1766 / 3066 language tag for hreflang tags
    public
                    getHreflang([bool $fetchCustomSetting = false ]) : string
    Parameters
- $fetchCustomSetting : bool = false
Return values
stringgetLanguageId()
    public
                    getLanguageId() : int
    Return values
intgetLocale()
    public
                    getLocale() : Locale
    Return values
LocalegetNavigationTitle()
    public
                    getNavigationTitle() : string
    Return values
stringgetTitle()
    public
                    getTitle() : string
    Return values
stringgetTwoLetterIsoCode()
Returns the ISO-639-1 language ISO code
    public
                    getTwoLetterIsoCode() : string
    not needed anymore, use $this->getLocale()->getLanguageCode() instead.
Return values
stringgetTypo3Language()
Returns the XLF label language key, returns "default" when it is "en".
    public
                    getTypo3Language() : string
    "default" is currently still needed for TypoScript label overloading. For locales like "en-US", this method returns "en_US" which can then be used for XLF file prefixes properly.
Return values
stringgetWebsiteTitle()
    public
                    getWebsiteTitle() : string
    Return values
stringhasCustomTypo3Language()
    public
                    hasCustomTypo3Language() : bool
    Return values
boolisEnabled()
Helper so fluid can work with this as well.
    public
                    isEnabled() : bool
    Return values
booltoArray()
Returns the SiteLanguage in an array representation for e.g. the usage in TypoScript.
    public
                    toArray() : array<string|int, mixed>