Project

General

Profile

Actions

Bug #100869

closed

Base CKEditor configuration prevents editor localization

Added by Andreas Nedbal about 1 year ago. Updated about 1 year 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

Also available in: Atom PDF