Bug #87946

Wrong translation on multilanguage page in plugins

Added by R3 H6 6 months ago. Updated 2 months ago.

Status:
New
Priority:
Must have
Category:
Extbase + l10n
Target version:
-
Start date:
2019-03-18
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Scenario:
Multidomain/Multilanguage installation:

+ Site A [de, fr, it]
+ Site B [fr]

Sylanguages:
- 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.

History

#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.

#2 Updated by Tymoteusz Motylewski 2 months ago

@R3H3 do I understand your case correctly, that locallang labels are not translated for you?
Then @David comments sounds like a different issue.

#3 Updated by David Bruchmann 2 months ago

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.

#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

Also available in: Atom PDF