---
title: "Language"
manual: "TYPO3 Explained"
version: "11.5"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3-request-attribute-language@11.5"
source: "ApiOverview/RequestLifeCycle/RequestAttributes/Language.rst"
rendered: "2026-10-21T15:30:00+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v11 has reached end-of-life as of October 31th 2024 and
> is no longer being maintained. Use the version switcher on the top
> left of this page to select documentation for a supported version of TYPO3.
>
> Need more time before upgrading?
> You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# Language {#typo3-request-attribute-language}

The `language` frontend request attribute provides information about the
current language of the webpage via the
`\TYPO3\CMS\Core\Site\Entity\SiteLanguage` object.

Example:

```php
$language = $request->getAttribute('language');
$locale = $language->getLocale();
```

## API {#api}

-   **class SiteLanguage**

    -   *Fully qualified name:* `\TYPO3\CMS\Core\Site\Entity\SiteLanguage`

    Entity representing a site_language configuration of a site object.

    -   **toArray()**

        Returns the SiteLanguage in an array representation for e.g. the usage
        in TypoScript.

        -   *returntype:* array

    -   **getLanguageId()**

        -   *returntype:* int

    -   **getLocale()**

        -   *returntype:* string

    -   **getBase()**

        -   *returntype:* Psr\\Http\\Message\\UriInterface

    -   **getTitle()**

        -   *returntype:* string

    -   **getNavigationTitle()**

        -   *returntype:* string

    -   **getWebsiteTitle()**

        -   *returntype:* string

    -   **getFlagIdentifier()**

        -   *returntype:* string

    -   **getTypo3Language()**

        -   *returntype:* string

    -   **getTwoLetterIsoCode()**

        Returns the ISO-639-1 language ISO code

        -   *returntype:* string

    -   **getHreflang()**

        Returns the RFC 1766 / 3066 language tag

        -   *returntype:* string

    -   **getDirection()**

        Returns the language direction

        -   *returntype:* string

    -   **enabled()**

        Returns true if the language is available in frontend usage

        -   *returntype:* bool

    -   **isEnabled()**

        Helper so fluid can work with this as well.

        -   *returntype:* bool

    -   **getFallbackType()**

        -   *returntype:* string

    -   **getFallbackLanguageIds()**

        -   *returntype:* array
