Issue Bug Resolved

#99064Languages in config.yaml should be order independent

Yannick Lieneweg 11/11/22, 14:52 updated 10/30/26, 07:10

Description

We have recently migrated our site from TYPO3 v10.4.31 to v11.5.18. Somehow there seems to be changes with the language management.

*The Problem:*
Using an earlier configured config.yaml (with TYPO3 version 9.5), the languages in the file are in the following order:

  • German (languageId: 1)
  • Italian (languageId: 2)
  • Ladin (languageId: 4)
  • English (languageId: 0, typo3Language: default)

The problem is illustrated in the picture ‘typo3v11-backend-wrong-language.png’: The backend shows German as the default language and the English language is missing despite being configured. German appears twice.

When I move the English language section to the beginning of the languages block, the problem is solved (See ‘correct-language-configuration.png’).
The correct parsing of the default language should not depend on the position it appears in the config.yaml.

Reviews 5

Files 3

History 1219

  1. Eric Harrer commented <span data-processor="relativetime" data-value="2023-08-03T21:58:13+00:00" > 08/03/23, 21:58 </span>

    I can confirm this behavior in TYPO3 11. Apparently the default language must always be in first place. This is probably due to the fact that the default language has a special status as a structure-giving language and is always located in the first column of the backend interface of the page module. When a site configuration is newly created via the backend interface, it is ensured that the default language is in the first position. This is not the case if the site configuration was created in another way. At least when saving via the backend interface, the default should be automatically pushed back to the first position. But in the end the languages need some order for the output in the backend.

  2. S P commented <span data-processor="relativetime" data-value="2025-10-24T09:24:59+00:00" > 10/24/25, 09:24 </span>

    Can confirm. The FE (for example, like LanguageMenuProcessor) does correctly use the order in YAML. But the BE has problems if L=0 is not first. For example, the preview link takes the first YAML entry then. And the “All Languages” view does show the first entry (not L=0) as the first column – and (worse) it repeats the Non-0 column again (and does not show L=0 at all).

  3. S P commented <span data-processor="relativetime" data-value="2025-10-24T09:43:11+00:00" > 10/24/25, 09:43 </span>

    I think the problem is that Site::getDefaultLanguage() does

    return reset($this->languages);

    Instead it should do something like

    return $this->getLanguageById(0);

    If I try this, it seems to fix many of the problems. But the order in the BE still seems to be the order of the YAML (and not ordered by sys_language_uid).

    I’d naturally expected the BE to order by languge ID, and the FE to order by the “physical” order in YAML.

  4. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-30T07:10:15+00:00" > 10/30/26, 07:10 </span>

    Applied in changeset commit:cdaa725d2d8add6da57e37f269094e8a222973d7.