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.