Actions
Bug #100869
closedBase CKEditor configuration prevents editor localization
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.
Actions