The attached are the modifications needed for the CSS, and an image to support RTL languages.
In D6 this file will be used automatically, in D5 it requires a patch, or support from the theme.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sun’s picture

Status: Needs review » Needs work

This patch alters the default stylesheet. Isn't there a clean CSS way to conditionally support RTL in Drupal 5?

yhager’s picture

Please note this patch creates a new file called admin_menu-rtl.css.

There is no standard way to support RTL languages in D5, so I chose the approach that is also supported for D6 - it includes the "-rtl.css" file right after the standard one, so the original CSS is untouched.

For more information on D6, see http://drupal.org/node/222782.

This patch can be used in the future D6 version of this module, or in D5 with a little bit of hackery. If you feel this is not good enough for committing, then leave this issue open and commit it when D6 version of this module is ready.

sun’s picture

Title: Support Right-To-Left languages » RTL support
Version: 5.x-2.2 » 5.x-2.x-dev
Component: CSS / Browser Support » User interface
Category: task » feature

Thanks for the clarification. To get this into admin_menu for D5, we need a way to conditionally enable/load this stylesheet. Otherwise, it has to wait until a D6 port for admin_menu is ready.

yhager’s picture

FileSize
3.48 KB

To get this into admin_menu for D5, we need a way to conditionally enable/load this stylesheet.

This is done at the theme layer. Existing solutions completely replace the original css with its rtl counterpart. If want to have this supported for D5 (for themes that implement this, like http://drupal.org/project/garlandrtl) use the attached as admin_menu-rtl.css (which is a copy of admin_menu.css with the RTL changes in the previous attachment). Don't forget the new PNG from the top of this issue.

druvision’s picture

Version: 5.x-2.x-dev » 5.x-2.4
Status: Needs work » Reviewed & tested by the community
FileSize
25.25 KB
183 bytes
3.87 KB

Here is a fuller file which worked for me.

Please commit the two files attached - admin_menu-rtl.css and arrow-rtl.css - into the 5.x version, even though they are beta quality - so people won't have to manually install it. This way we will get more feedback. Please put admin_menu-rtl.css in the main module's directory and arrow-rtl.png in the images directory.

No code changes are needed - the files are automatically used by RTL-aware themes.

Thanks in advance,

Amnon
-
Professional: Drupal Israel | Drupal Development & Consulting | Eco-Healing
Personal: Hitech Dolphin: Regain Simple Joy :)

druvision’s picture

Status: Reviewed & tested by the community » Needs work

Not so fast....

In IE, it doesn't work as expected.
The secondary menus have a large left offser.

sun’s picture

Status: Needs work » Needs review
FileSize
3.7 KB

Please test attached stylesheet.

yhager’s picture

Status: Needs review » Needs work
FileSize
150.62 KB

#7 works correctly for FF3 and Konqueror 3.5.8.
With Opera 9.5 all menus are at the right edge of the screen (see screenshot attached of the "Site Configuration" menu)

yhager’s picture

Version: 5.x-2.4 » 6.x-1.1
Status: Needs work » Needs review
FileSize
273 bytes
768 bytes

After a lot of help from tombigel, we managed to create the RTL version of this CSS, which was tested to work for IE, Opera and FF.

I am attaching admin_menu-rtl.css, and reattaching arrow-rtl.png - the previous one had an issue with IE.

The RTL'ed CSS now only lists the differences from the main CSS, as is usually done for Drupal 6.x.

There is no change to the original CSS, so this does not change any of the LTR behavior of this module. Therefore, no patch attached, only new files (which are used automatically by Drupal if exists).

sun’s picture

Status: Needs review » Fixed
FileSize
1.26 KB

Thanks, tested, fixed a few styles, and committed!

druvision’s picture

Status: Fixed » Active
FileSize
48.89 KB

Thanks for the fix - It works fantastically under Firefox, Safari and Google Chrome.

There is a need for a slight improvement for explorer 6+7 - all submenus are slided left. Submenus appear exactly one menu item to the left of the original menu item.

See attached image for demo.

yhager’s picture

@levavie: does you comment regarding IE shifted menus relate to the patch in #10 or in #9? Can you please check again with #9 and let us know if there is a difference (between #9 and #10)? I don't have access to IE myself..

yhager’s picture

Thanks to codeweavers for their lame duck presidential challenge, I got myself a working IE6 install.

I can confirm that the dev version behaves differently for IE6 - in IE6 the expanded menus are shifted to the left. The patch in #9 works correctly, so probably one of the adjustment made for #10 broke it.

sun’s picture

Status: Active » Needs review
FileSize
643 bytes

Please test whether attached patch fixes this. It's the only difference between #9 and #10, which should have an effect at all.

yhager’s picture

Status: Needs review » Reviewed & tested by the community

Thats it!

Thanks.

sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for testing!

druvision’s picture

It's OK now
Thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.