Project

General

Profile

Actions

Feature #105318

open

Similar overlay type to mixed but without the base language

Added by Fabian Michael about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2024-10-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

We have the requirement that we need to show only records for a specific language area like DACH but don't show records from the base language. With the overlay type mixed the fallbacks are working but it also shows all records from the base language. I tried all possible combinations when creating the language aspect and setting setRespectSysLanguage ture/false but nothing gave the desired result.

Say we have the following Records:

- Record 1: EN, DE
- Record 2: EN, DE, AT
- Record 3: EN
- Record 4: EN, AT

Taking the fallback chain into account (AT -> DE) it should result in:

EN: 1 (EN), 2 (EN), 3 (EN), 4 (EN)
DE: 1 (DE), 2 (DE)
AT: 1 (DE), 2 (AT), 4 (AT)
CH: 1 (DE), 2 (DE)

Currently overlay type mixed gives the following results:

EN: 1 (EN), 2 (EN), 3 (EN), 4 (EN)
DE: 1 (DE), 2 (DE), 3 (EN), 4 (EN)
AT: 1 (DE), 2 (AT), 3 (EN), 4 (AT)
CH: 1 (DE), 2 (DE), 3 (EN), 4 (EN)

Overlay type on only gives the requested language:

EN: 1 (EN), 2 (EN), 3 (EN), 4 (EN)
DE: 1 (DE), 2 (DE)
AT: 2 (AT), 4 (AT)
CH: nothing

What we currently need to do in order to achive the desired result is to fetch records in the fallback languge (say DE), take the l10n parent IDs and than fetch the records by IDs and overlay to the desired language. In TYPO3 11 we also had to implement a hook to take the fallback chain into account for the overlays.

Edit: In TYPO3 12 I had to migrate the hook into a listener for the BeforeRecordLanguageOverlayEvent

Actions #1

Updated by Fabian Michael about 1 month ago

  • Description updated (diff)
Actions #2

Updated by Fabian Michael about 1 month ago

  • Description updated (diff)
Actions #3

Updated by Fabian Michael about 1 month ago

  • Description updated (diff)
Actions #4

Updated by Fabian Michael about 1 month ago

  • Description updated (diff)
Actions

Also available in: Atom PDF