Wrong translation on multilanguage page in plugins
+ Site A [de, fr, it]
+ Site B [fr]
- de: 0
- fr: 1
- it: 2
Sites are setup with site module.
On Site A, German is setup as default language.
On Site B, French is setup as default language.
Any Extbase plugin on Site B displays translated labels in German. Labels are translated with fluid viewhelper.
The problem is, that on Site B, the property "typo3Language" is "de" on the object SiteLanguage.
The Extbase LocalizationUtility is using this property, better would be twoLetterIsoCode.
#1 Updated by David Bruchmann 2 months ago
The point is that extbase is doing some (messy) stuff concerning translations but it shouldn't at all.
Usually records are still passed to the core and overlayed there - there it fails because extbase is messing up already before:
- Instead of letting the core doing it's work, extbase is replacing records already by the (somehow determined) translation.
- Then the records get the wrong sys_language_uid (0) to pass the core functions without correct handling.
- core-handling of translations is not always correct too, but extbase shouldn't care about it.
This is absolutely worst scenario, but it's done like that and requires usage of at least one hook with further queries to fix extbase's mess.
#4 Updated by Jonas Schwabe 2 months ago
David Bruchmann wrote:
Yeah @Tymoteusz ,sorry, my issue might be different.
By usage of a hook of the extension sysext/frontend (hook: getRecordOverlay_preProcess) it might be possible to determine the language for the labels correct, but it might depend on the extension.
This is probably what you are referring to (I'm dealing with the same issue right now): #88784