Hello
I'm working on a mulitilanguage website with arabic as the default language and French. I'm trying to set the directionality option in TinyMCE to RTL for Arabic content only:
In mysite/code/page.php I added:
public function getCMSFields() {
$fields = parent::getCMSFields();
$locale = Translatable::get_current_locale();
if ($locale == 'ar_MA') {
HtmlEditorConfig::get('cms')->setOption('directionality', 'rtl');
return $fields;
}
}
Using this code I can edite content in Arabic easily from right to left. However, I can't access to the french translation pagewhen I click on it.
I assume the problem is caused by the conditional "if ($locale == 'ar_MA')" which I added to the code, since i'm not sure of the correct way to do it. I appreciate any help..
thanks