If typing in a Hebrew sentence (which I will sometimes do when directly quoting a source, along with a translation into Hebrew), is it possible for format the text from Right to Left? In CSS this would be done by text-direction:rtl for the text block being formatted. However, according to this post it doesn't look like I would be able to do that (I would need to be able to use a style attribute for the <p> html tag).

Edit: Looks like this is already a dormant feature request here, though maybe it is now time to ask again (if you think it is an issue, maybe leave an answer there asking for it or vote up that question).

share
    
At worst case, when this site goes live, we can have them implement it as a site feature - ala LaTex on Tex.SE, MathJax on Math.SE, etc... –  AviD May 17 '11 at 6:33

4 Answers 4

I recommend http://www.w3.org/International/articles/inline-bidi-markup/, some relevant parts of which as they apply here follow:

  1. The basic direction of the page is left-to-right.
  2. Any Hebrew will appear right-to-left.
  3. Because of item 1, any directionally neutral characters near the Hebrew will appear left-to-right. Hence, if I type "yodea" in Hebrew, a comma, a space, and "know" in English, it comes out as יודע, know.
  4. A so-called right-to-left mark is an invisible character that takes up no space on the line and is treated as a right-to-left character. Thus, any directionally neutral characters between it and other right-to-left characters will be surrounded (i.e. on both sides) by right-to-left characters and therefore appear right to left.
  5. You insert a right-to-left mark by typing &rlm;.
  6. Thus, if I type "yodea" in Hebrew, a comma, a space, &rlm;, and "know" in English, it comes out as יודע, ‏know. Notice that the comma and space are to the left of the Hebrew text.
  7. This works well with a period at the end of a Hebrew quotation: add &rlm; after the period, and it will appear to the left of the quotation. An example sentence follows:

    משפט אחד יהיה לכם.‏

  8. It works with English after also, as follows:

    משפט אחד יהיה לכם.‏

    Here's a sentence for you.

  9. The left-to-right mark &lrm; can be used between adjacent Hebrew texts to serve as a left-to-right character, making the Hebrew texts come out in left-to-right order.

  10. Thus, for example, a list of words starting with successive letters of the Hebrew alphabet will come out as אהבה, בטחון, and גדלות, while putting &lrm; after (or before) the comma (or space) between the alef-word and the bes-word will yield אהבה,‎ בטחון, and גדלות as intended.
share
1  
I didn't know about this. Thanks. The one thing that this doesn't help with (aside from being pretty annoying to write in, even if you know how to do it) is getting the text to align to the right side of the page when it is in its own text block. –  Yaakov Ellis May 17 '11 at 6:39
    
@YaakovEllis, yes, I thought putting a RLM, the double-line-break that makes a new paragraph, your Hebrew text, another double-line-break, and another RLM would make the Hebrew paragraph be aligned right, but it doesn't work (in this browser, at least). I don't think there's a way to do it. Re annoyingness: You get used to it. I have. –  msh210 May 17 '11 at 14:31

One small step we've taken in this direction (heh) is offering an integrated virtual keyboard which includes a convenient &rlm; key. (You can thank HodofHod for the idea.) As I mentioned on the network-wide request, we don't have any immediate plans to go further. However, internationalization is an important part of our strategy. Please give us feedback about the keyboard (positive, negative, or neutral).

share
2  
Something that I see on gmail, which would be awesome to see here, is that if you start typing a paragraph in Hebrew, after you enter the first few characters as Hebrew chars in the WYSIWYG mode, it automatically right aligns that paragraph (by presumably adding an &rlm; notation or something equivalent, in the invisible markup). This works very reliably with the gmail implementation, would be great to see here. –  Yaakov Ellis Sep 28 '13 at 19:21
1  
I, in turn, would like to thank Menachem for the idea, and Jon and the devs for making it happen. –  HodofHod Oct 1 '13 at 8:19

Instead of literally typing &rlm, It is also possible -- and some people would also say easier -- to:

  1. use a word processor such as Microsoft Word, OpenOffice, or LibreOffice to edit your text, and to graphically insert the right-to-left character using the appropriate menu item
  2. copy and paste the resulting text into your browser, where you are composing/editing your post or comment for StackExchange.com
share

This is something that we definitely want to support, but we want to do it properly in conjunction with the other localization work that is currently going into the engine. It is possible for us to turn on tweaks to Markdown that allows for these special blocks, but they can (and do) quickly turn into much bigger endeavors than we imagined as we deal with slight differences in design from site to site.

The correct solution isn't asking you to use third party hacks or tricks, or implementing our own hacks or tricks, it's to get localization done and done well - and that's exactly what we're going to do. It is a huge undertaking, however, so I can't promise it any time soon. Luckily, there are ways to work around it, however clunky.

I'll mark this as deferred for now - as we're definitely going to do it - I'm just sorry that I can't give you a better approximation of when we're going to do it. When that's more clear, I will be letting communities that very much want these features know when we'll hopefully have them available.

share

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .