#97778contentsLangDirection is not set automatically for RTL languages
Description
When initializing CKEditor TYPO3 is generating a configuration array that contains contentsLanguage but not contentsLangDirection.
EXT:rte_ckeditor/Classes/Form/Element/RichTextElement.php:398
$configuration['contentsLanguage'] = $this->getLanguageIsoCodeOfContent();
For most languages that’s OK but not for Arabic which is RTL and the editor should be set to that mode. Otherwise the user needs to apply the dir-attribute to each and every paragraph manually if they wanna edit the texts in the intended way.
A fix could be determining the direction based on reading the languages dir parameter from the site config? Or simply hardcoding a list of the most common RTL languages (Arabic, Hebrew, …)