Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Never thought that RTL styling would be that much more complicated. There really should be an easier way.


The reason is that in RTL languages you typically mix RTL words with LTR words. In LTR text this is very rare.

For example western brand names or simply just digits, even the arabic versions of digits, are rendered as an embedded LTR word.

The dir="RTL" tag, apart from adjusting alignment, gives a hint whether this paragraph has RTL as a main direction. Otherwise the browser will pick the direction from the first letters in the paragraph (RTLness of a word is an intrinsic property of what unicode character is used). And if those first letters happen to be a western brand name or a digit, the whole sentence would be flipped.

Anyway great article! I cringe when I think about all the bugs and glitches arabic or hebrew readers have to endure in software. Not only in browsers though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: