Zen RTL support

Events happening in the community are now at Drupal community events on www.drupal.org.
shohaml's picture

I have posted this as a wiki, but was asked to do so as a story - for comments.

I was missing some i18n support in Zen, mainly RTL.

I have added RTL support to version 5.x-0.6 of the theme, so it is just for Drupal 5. I would be happy to receive comments, and to eventually see it in the main branch.

What have I done?
I have added a new class to the body. If the document is left-to-right (the default) it is ".ltr". If the document is right-to-left, the class added is ".rtl". It is similar to the game with the sidebars - you distinguish between different layouts by classes.
The engine uses the i18n module's function "i18n_language_rtl()" to check for directivity of the current language. The default, even if the i18n module is missing, is to use "ltr".

I have also added a hack for IE6 - to fix right-sidebar glitches. I used "Tan hack" to make the fix transparent to other browsers.

One last thing... how can I post a tar.gz file? The only attachments allowed are of documents. I would like to attach my code for everyone to see and use.

Thanks,
Shoham Levy

Comments

re: Zen RTL support

druvision's picture

shalom Shoham,

Please create a blog post in Drupal Israel (http://drupal.org.il/node/add/blog, after you login). You can freely attach file and will get a much larger exposure to the Israeli RTL community for this important issue. Also see the current status of anotheranother zen RTL version.

BIDI theme implementation should follow the same steps as done for Garland BIDI - Take a look at the template.php file to see a possible solution. Of couse, drupal 6 BIDI themes will be much easier, since RTL is built into Drupal core. Just add an -rtl.css to the same directory of the original CSS file and you are done.

You shouldn't force people to use the I18n module - it has no connection to BIDI. So you need a code review.

Enjoy,

Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | בניית אתרים
Personal: Hitech Dolphin: Regain Simple Joy :)

Hi Shoham and Levavie, I

guillaumeduveau's picture

Hi Shoham and Levavie,

I want to use Zen in RTL for a website in arabic.

It seems RTL is still not in Zen. I think it's a shame, because the version you have linked Levavie, is now old since the last Zen release was in 2008-Feb-14. Moreover Hebrew is not very easy to read for everybody.

I agree that Zen RTL should be independant of the I18n module, so I'm gonna try to build RTL support in a Zen Subtheme. What do you think of this ? I'd be interested to see Shoham's hacks as well, if you can post them somewhere.

RTL++

jjeff's picture

I'd just like to say that I fully encourage RTL support for Zen. Neither John Albin nor myself have done much (if any) work using RTL languages, so it's really up to you to help us test it out and get it working correctly. But you've got my backing, if that's any help!

-= Jeff Robbins | Lullabot | Drupalize.me =-

+1

johnalbin's picture

I concur with Jeff.

I think getting RTL support into Zen is important. And since Drupal 6 adds RTL support to its themes, I think that built-in RTL support is just as important as built-in support for internationalization (which I think Zen does well already.) But, unfortunately, the languages I can read are all LTR, so its a bit hard to test.

levavie, thanks for the links. They're helpful.

Would either of you please create a feature request for Zen 6.x? http://drupal.org/node/add/project-issue/zen

  - John (JohnAlbin)

  - John (JohnAlbin)

I opened the feature request

michaelbn's picture

Hi,

I opened the feature request and now I am waiting eagery to join forces.

http://drupal.org/node/283978

Best,
Michael

Willing to help

ano1's picture

Hi All,

I am developing a few sites which will need RTL support. We are currently using zen as a base and am willing to help with this as much as possible. What is the current status of this project/work?

Thanks I look forward to collaborating with you on this,

Jeff