---
title: "language-menu data processor"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:languagemenuprocessor@main"
source: "DataProcessing/LanguageMenuProcessor.rst"
rendered: "2026-09-28T13:35:13+00:00"
---

# language-menu data processor {#languagemenuprocessor}

The processor `\TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor`,
alias `language-menu`, generates a list of language menu items which can be
assigned to the `FLUIDTEMPLATE` as a variable.

**Table of contents**

-   [Options:](https://docs.typo3.org/permalink/t3tsref:options@main)
-   [Example: Menu of all language from site configuration](https://docs.typo3.org/permalink/t3tsref:example-menu-of-all-language-from-site-configuration@main)

> [!TIP]
> **Hint**
>
> The third-party extension
> [b13/menus](https://extensions.typo3.org/extension/menus) also provides
> a language menu processor: `\B13\Menus\DataProcessing\LanguageMenu`.
>
> Refer to the [manual of the extension b13/menus](https://github.com/b13/menus/blob/master/README.md) for more
> information.

## Options: {#languagemenuprocessor-options}

**if**

-   **if**

    -   *Type:* [if](https://docs.typo3.org/permalink/t3tsref:if@main) condition

    Only if the condition is met the data processor is executed.

**languages**

-   **languages**

    -   *Type:* [string](https://docs.typo3.org/permalink/t3tsref:data-type-string@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* "auto"
    -   *Example:* "0,1,2"

    A list of comma-separated language IDs (e.g. 0,1,2) to use for the menu
    creation or `auto` to load from the [site configuration](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/Index.html#sitehandling).

**addQueryString.exclude**

-   **addQueryString.exclude**

    -   *Type:* [string](https://docs.typo3.org/permalink/t3tsref:data-type-string@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* ""
    -   *Example:* "gclid,contrast"

    A list of comma-separated parameter names to be excluded from the language
    menu URLs.

**as**

-   **as**

    -   *Type:* [string](https://docs.typo3.org/permalink/t3tsref:data-type-string@main)
    -   *Default:* defaults to the fieldName

    The variable name to be used in the Fluid template.

## Example: Menu of all language from site configuration {#languagemenuprocessor-example}

Please see also [About the examples](https://docs.typo3.org/permalink/t3tsref:dataprocessing-about-examples@main).

**TypoScript**

Using the `\TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor`
the following scenario is possible:

**EXT:examples/Configuration/TypoScript/DataProcessors/Processors/LanguageMenuProcessor.typoscript**

```typoscript
tt_content {
  examples_dataproclang =< lib.contentElement
  examples_dataproclang {
    templateName = DataProcLangMenu
    dataProcessing.10 = language-menu
    dataProcessing.10 {
      languages = auto
      as = languageNavigation
    }
  }
}

```

**The Fluid template**

This generated menu can be used in Fluid like this:

**EXT:examples/Resources/Private/Templates/ContentElements/DataProcLangMenu.fluid.html**

```html
<html data-namespace-typo3-fluid="true" xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers">
  <h2>Data in variable languageNavigation</h2>
  <f:debug inline="true">{languageNavigation}</f:debug>

  <h2>Output</h2>
  <f:if condition="{languageNavigation}">
    <ul id="language" class="language-menu">
      <f:for each="{languageNavigation}" as="item">
        <li class="{f:if(condition: item.active, then: 'active')}
            {f:if(condition: item.available, else: ' text-muted')}">
          <f:if condition="{item.available}">
            <f:then>
              <a href="{item.link}" hreflang="{item.hreflang}"
                title="{item.navigationTitle}">
                <span>{item.navigationTitle}</span>
              </a>
            </f:then>
            <f:else>
              <span>{item.navigationTitle}</span>
            </f:else>
          </f:if>
        </li>
      </f:for>
    </ul>
  </f:if>

</html>

```

**Output**

The array now contains information on all languages as defined in the site
configuration. As the current page is not translated into German, the
German language has the `item.available` set to `false`. It therefore
does not get linked in the template.

![Output of a LanguageMenuProcessor, including debug output](../Images/ManualScreenshots/DataProcessing/LanguageMenuProcessor.png)
