I have a multi-language website that has just recently added Hebrew. So far, I have managed to find a way to have the text display right-to-left in the front end with CSS, and a semi-working solution for the admin fields.
However, there are 2 issues with display right-to-left text in the fields in the admin view: What I have setup in _config.php does not seem to apply to the language tabs for the MicrositeWidget data object I have set up. What happens is, no matter which language tab you're on, the content displays right-to-left unless you reload the page.
For everything else, the right-to-left text doesn't display consistently in the admin. When I switch languages, text displays right-to-left for English, Japanese, Korean, etc--basically all languages that aren't Hebrew. If I fresh the page, then everything is back to normal unless I go to Hebrew.
Here is what I have regarding the custom Admin CSS file I created:
#Root_heIL input, #Root_heIL textarea, #Root_heIL select,
input, textarea, select{
direction: rtl !important;
}
And here is what I have in the _config.php file:
if(stristr($_SERVER['REQUEST_URI'], 'he_IL') !== FALSE || stristr($_SERVER['REQUEST_URI'], 'he_')){
HtmlEditorConfig::get('cms')->setOption('directionality', 'rtl');
}
Here are some screenshots to illustrate the inconsistencies. I've tried running dev/build?flush=all followed by dev/build?flush=1 but no luck in fixing this:
Image 1: Hebrew text in WYSIWYG when Hebrew is selected. Image 2: Japanese text in WYSIWYG when switching to Japanese.
Image 3: Japanese text in WYSWIG when reloading the page.
Has anyone encountered issues with Hebrew in SilverStripe displaying right-to-left in the admin fields? If so, did you find a working solution? So far, I haven't had much luck finding a solid, consistent solution for the problem.