---
title: "LocalizationUtility (Extbase)"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extbase-localization-utility-api@12.4"
source: "ApiOverview/Localization/LocalizationApi/LocalizationUtility.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

> [!WARNING]
> **Attention**
>
> TYPO3 v12 has reached end-of-life as of April 30th 2026 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 v12 here:
> [TYPO3 ELTS](https://typo3.com/services/extended-support-elts).

# LocalizationUtility (Extbase) {#extbase-localization-utility-api}

This class is used to translate strings within Extbase context. For an example
see [Localization in Extbase](https://docs.typo3.org/permalink/t3coreapi:extension-localization-extbase@12.4).

-   **class LocalizationUtility**

    -   *Fully qualified name:* `\TYPO3\CMS\Extbase\Utility\LocalizationUtility`

    Localization helper which should be used to fetch localized labels.

    -   **translate(string $key, ?string $extensionName = NULL, ?array $arguments = NULL, ?TYPO3\\CMS\\Core\\Localization\\Locale|string|null $languageKey = NULL, ?array $alternativeLanguageKeys = NULL)**

        Returns the localized label of the LOCAL_LANG key, $key.

        -   *param $key:* The key from the LOCAL_LANG array for which to return the value.
        -   *param $extensionName:* The name of the extension, default: NULL
        -   *param $arguments:* The arguments of the extension, being passed over to sprintf, default: NULL
        -   *param $languageKey:* The language key or null for using the current language from the system, default: NULL
        -   *param $alternativeLanguageKeys:* The alternative language keys if no translation was found. @deprecated will be removed in TYPO3 v13.0, default: NULL
        -   *Return description:* The value from LOCAL_LANG or null if no translation was found.

        *Returns:* `string|null`
