Ilmari Karonen wrote:
William Allen Simpson wrote:
(2) Display and edit as RTL. In practice, this turned out to be fairly simple by thinking about such things as opening and closing parentheses, rather than left and right. They simply are reversed on display.
The major difficulty, based on what I've seen, seem to be parentheses and other punctuation in mixed LTR/RTL text. The browsers try to guess which way these should be displayed, but they're not very good at it.
This isn't much of a problem in the displayed content, since there we can use <span> tags to explictly set the directionality, but in the edit box. Ironically, HTML tags themselves are a problem when embedded in RTL text, since they themselves consist of LTR text surrounded by paired delimiters. For example, if the source of a page contained, in storage order, the string "HE<span>BR</span>EW", where the capitals stand for Hebrew letters, it may render in the edit box as "WEspan>/>RBspan>>EH". Not very easy to edit, is it?
Aha, I'd not considered that this problem would also occur with the HTML markup itself. Seems like the same problem as templates.
As a practical suggestion, it might be a good idea to set the CSS property "unicode-bidi: bidi-override;" for the edit box. That should, in browsers that understand it, force all the text in the edit box to render in the same direction. That way, on a RTL wiki, the example string above would render as "WE<naps/>RB<naps>EH", which at least is less confusing than the current rendering.
I only knew about "<BDO>...</BDO>" but not "bidi-override;" for entire sections, very clever.
In fact, I just tested it by adding:
FORM#editform TEXTAREA#wpTextbox1 { unicode-bidi: bidi-override; }
to my monobook.css on yi.wiktionary and it seems to work. Gangleri, can you try this and say if it helps any?
Might check with a variety of editors in several languages, as Gangleri admits he doesn't actually write them. Are these well represented on technical lists?