I currently developing a multi-language interface for a Django project. But when I started to work on Arabic and Hebrew languages, I noticed all pages messed up after dir="rtl" to html tag (according to instructions on http://www.w3.org/International/tutorials/bidi-xhtml/)
Does that mean I need separate stylesheets for right-to-left languages?
Languages like Arabic, Urdu, Kurdish, Hebrew, and Persian follow the right-to-left style of script. One of the primary UX considerations for international websites is that the layout can accommodate different styles of language scripts.
If it's a Hebrew (or Arabic, etc.) character, the element will get a direction of rtl. If it's, say, a Latin character, the direction will be ltr.
For example, the en-US locale (for US English) specifies left-to-right. Most Western languages, as well as many others around the world, are written LTR. The opposite of LTR, RTL (Right To Left) is used in other common languages, including Arabic ( ar ) and Hebrew ( he ).
rtl. Right-to-left text direction. auto. Let the browser figure out the text direction, based on the content (only recommended if the text direction is unknown)
Do not put the style attribute to the html tag.
Use the dir='rtl'
attribute only inside the div's where you actually use Arabic and Hebrew. Not for the entire page.
What you need to do in addition to adding the dir="rtl" to the tag is flipping your stylesheets. Create an rtl.css stylesheet which will act like a mirror to your default stylesheet. For example. If your style.css has this rule below:
.some-class { margin: 10px 5px 10px 7px; }
In the rtl.css it will be flipped like this:
.some-class { margin: 10px 7px 10px 5px; }
Check this: http://rtl-this.com/tutorial/3-different-ways-rtl-your-css
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With