Project

General

Profile

Actions

Bug #100869

closed

Base CKEditor configuration prevents editor localization

Added by Andreas Nedbal about 1 year ago. Updated 12 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2023-05-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
12
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

The Default/Minimal/Full.yaml files all include the Editor/Base.yaml file, which sets the following options:

    language:
      # will be overridden by the locale of the backend user
      ui: 'en'
      # will be overridden by the record (if a language is set)
      content: 'en'

However the statements "will be overriden" are not correct, because prepareConfigurationForEditor() contains following code:

        // Set the UI language of the editor if not hard-coded by the existing configuration
        if (empty($configuration['language'])) {
            $userLang = (string)($this->getBackendUser()->user['lang'] ?: 'en');
            $configuration['language']['ui'] = $userLang === 'default' ? 'en' : $userLang;
        } elseif (!is_array($configuration['language'])) {
            $configuration['language'] = [
                'ui' => $configuration['language'],
            ];
        }

Since the language configuration is never empty if we use the Base configuration (which is most cases now), the CKEditor instance doesn't get passed the backend user locale, causing the UI to always be in English.


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #100633: CKEditor: Wrong language for interface and contentResolved2023-04-17

Actions
Actions #1

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79023

Actions #2

Updated by Andreas Nedbal about 1 year ago

  • Is duplicate of Bug #100633: CKEditor: Wrong language for interface and content added
Actions #3

Updated by Andreas Nedbal 12 months ago

  • Status changed from Under Review to Resolved
Actions

Also available in: Atom PDF