---
title: "LocalizationUtility (Extbase)"
manual: "TYPO3 Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3coreapi:extbase-localization-utility-api@main"
source: "ApiOverview/Localization/LocalizationApi/LocalizationUtility.rst"
rendered: "2026-09-21T11:24:09+00:00"
---

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

The `\TYPO3\CMS\Extbase\Utility\LocalizationUtility` 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@main).

-   **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, ?\\Psr\\Http\\Message\\ServerRequestInterface $request = 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 or domain name (such as "myextension.messages"), default: NULL
        -   *param $arguments:* The arguments for the label. For sprintf-style labels (e.g., "Downloaded %d times"),use positional arguments \[42\]. For ICU MessageFormat labels(e.g., "{count, plural, one {# file} other {# files}}"), use named arguments \['count' => 42\]., default: NULL
        -   *param $languageKey:* The language key or null for using the current language from the system, default: NULL
        -   *param $request:* the request, default: NULL
        -   *Return description:* The value from LOCAL_LANG or null if no translation was found.

        *Returns:* `string|null`
