Issue Bug Closed

#107348page.inlineLanguageLabelFiles doesn't use language ISO code

Steffen Keuper 08/29/25, 01:31 updated 03/31/26, 09:00

Description

the TypoScript setting page.inlineLanguageLabelFiles doesn’t generate the language ISO code on inclusion causing fallbacks to the default language without exact locale name like “de-DE.locallang_test.xlf” (“de.locallang_test.xlf” is ignored on locale: de_DE.utf8)

Example language setup (default preset options):

languages:
  -
    title: English
    enabled: true
    languageId: 0
    base: /
    locale: en_US.UTF-8
    navigationTitle: English
    flag: us
  -
    title: German
    enabled: true
    locale: de_DE.utf8
    hreflang: ''
    base: /de/
    websiteTitle: ''
    navigationTitle: Deutsch
    fallbackType: strict
    fallbacks: ''
    flag: de
    languageId: 1

Example TypoScript:

page {
    inlineLanguageLabelFiles {
        test = EXT:test/Resources/Private/Language/locallang_test.xlf
    }
}

PageRenderer->loadJavaScriptLanguageStrings continues to PageRenderer->readLLfile where on the example of the german language the $allLocales only contains 0 => “de-DE“
This causes this call $this->localizationFactory->getParsedData($fileRef, $locale); to only look for f.e. “de-DE.locallang_test.xlf”.
The $languageIsoCode (on normal Frontend initialization generated in \TYPO3\CMS\Core\Localization\Locales->getLocaleDependencies) is never generated.

In my setup those files exist:
de.locallang_test.xlf -> not read by page.inlineLanguageLabelFiles (normal fluid localization works though)
de-DE.locallang_test.xlf -> works
locallang_test.xlf -> works

It would also theoretically work to change the locale manually from de_DE.utf8 to de.utf8 but I think that’s missing the point here.
Tested on a fresh TYPO3 system with the versions (v12.4.36 and v13.4.17)

Reviews 3