---
title: "Feature: Language menu"
manual: "Frontend Theme for Extension Development"
version: "main"
source: "Changelog/2.0/Feature-LanguageMenu.rst"
modified: "2026-09-17T04:52:50+00:00"
---

# Feature: Language menu

## Description

A site with more than one language shows a language menu in the site header,
inside a dropdown. A site with one language shows nothing at all.

The menu lists every language of the site configuration. The language being
read is marked; a language the current page **has no translation for is shown
as plain text rather than as a link**.

That last point is the whole design of this feature. Leaving the language out
would tell a reader the site has fewer languages than it has. Linking it would
promise a translation that does not exist and land the reader on a fallback
page without a word about it. So the language is shown, and shown to be
unavailable - announced as disabled to assistive technology.

Whether a language is available for a page is decided by TYPO3, not by the
theme: it is available when the page has a translation in that language, or in
a **non-default** fallback language that does have one. Setting
`fallbackType: fallback` with `fallbacks: 0` does not make a page
count as translated - the default language is filtered out of the overlay chain
\- although it does change what the page itself renders.

### The dropdown

The menu sits behind a labelled button in the header that discloses a panel
below it. The panel is a native `popover`, so the browser opens it,
closes it and puts it in the top layer: `Escape` and a click outside
dismiss it. `Tab` does **not** close it - light dismiss reacts to those
two routes, not to focus leaving the panel.

The dropdown works without the theme's JavaScript and is rendered whether the
script loaded or not. The one thing the script adds is
`aria-expanded` on the button, mirrored from the panel's own
`toggle` event, because the Popover API tells assistive technology
nothing about the trigger. A page whose script failed to load therefore has a
working dropdown whose button reports a stale state, rather than a dead
button.

## Impact

The development instances gain a second language, German, in
`config/sites/demo/config.yaml` and `config/sites/demo-legacy/config.yaml`.
The showcase itself is seeded in English only - the seeding tool cannot express
a translation - so the demo shows the unavailable state on every page, which is
the truth about that tree.

Adding a language to a site needs no database record: the `sys_language` table
was removed in TYPO3 v12, and a site language is the site configuration alone.

The menu is core `LanguageMenuProcessor` at
`page.10.dataProcessing.40`, so a site package drops it with
`page.10.dataProcessing.40 >` and keeps the other three navigations.
Its markup is `Partials/Navigation/Language.html`, the dropdown around it
`Partials/Page/Dropdown.html`.

Two new components ship: `.theme-language-menu` and the generic
`.theme-dropdown` \- see [Components](../../Components/Index.html#components). The dropdown is built on the
native `popover` attribute, which is what moved the theme's browser
floor to Firefox 125 - see
[Important: The browser floor moves to Firefox 125](Important-BrowserFloorMovesToFirefox125.html#important-browser-floor-moves-to-firefox-125).
