Bug #100176
closedTranslations not available in v12.2 when using language key with country in site config
100%
Description
In my site configuration the locale field of a language configuration is set to "de_DE.utf8". This results in a locale "de-DE" for translation.
This is now also used in LocalizationFactory when retrieving the translations via getParsedData() method.
As the translation file is named "de.locallang.xlf" but the mentioned method resolves the path to "de-DE.locallang.xlf" the translations falls back to the default language (English, what is not wanted on a German page).
When I change the locallang file to "de-DE.locallang.xlf" the translation works. But this is not what is wanted, especially when having multiple countries for the same language, like de-DE, de-AT, de-CH and just want to override some labels for a specific country.
I use <f:translate> view helper in a page template when the error occurred (non-Extbase context). Using the view helper in Extbase context seems to work.
Another observation: When logged-in into the backend and using the translate view helper out of Extbase in frontend, the getLanguageService() method of the view helper returns $GLOBALS['LANG'] early. Which means, the language is based on the language of the backend user, not the language of the frontend page.