Support translatable media entities

Created on 22 March 2023, over 1 year ago
Updated 19 April 2023, about 1 year ago

Problem/Motivation

Currently, pagedesigner always loads the default language of a media entity (audio, images, documents etc.). It should check, if there is an available translation in the current content language and load it instead of the default translation.
This way, media entities can be made translatable and language versions of files provided.

Proposed resolution

In MediaFieldHandlerBase and children, check if a translation in the current language is available and load the file entity from the translation. If no translation is available, fall back to the original language of the media entity.
If there is no file on the translation don't provide any output for the file source (as this means that the translation doesn't have a file attached).

Remaining tasks

- Adjust MediaFieldHandlerBase and children
- Test

API changes

Media handler plugins will provide media entities / files in the content language preferably.

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland pvbergen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024