[BUGFIX] Ensure translate ViewHelper uses site language locale
When using the `<f:translate>` ViewHelper out of Extbase context (e.g., in `FLUIDTEMPLATE` or `StandaloneView`), TYPO3 v12 checked for `$GLOBALS[LANG]`, which is wrong, as this is the language of a backend editor - all labels (outside of Extbase) were then rendered with the editors view. This is of course an ugly bug, which happened due to https://review.typo3.org/c/Packages/TYPO3.CMS/+/75941 For this reason, `<f:translate>` does not check for `$GLOBALS[LANG]` anymore, but instead checks for the `SiteLanguage` first, and then checks for the `$GLOBALS[BE_USER]`. In addition, as long as we have a static list of dependencies, the locale object needs to be instantiated from the `Locales` class in order to resolve the defined dependencies. This could probably vanish once all information is put into the right places. Resolves: #100255 Resolves: #100176 Releases: main Change-Id: I50c24008f0a16432e9122e0e186cd4a9b8e8f476 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78325 Tested-by:core-ci <typo3@b13.com> Tested-by:
Marc Willmann <mw@f7.de> Reviewed-by:
Marc Willmann <mw@f7.de> Reviewed-by:
Kevin Appelt <kevin.appelt@icloud.com> Tested-by:
Kevin Appelt <kevin.appelt@icloud.com>
Showing
Please register or sign in to comment