hi.

I have been trying to hack the internet_services theme to work well in a multilingual environment, with an rtl locale, (arabic). here is what I did so far:

  1. in my template.php file I put the following function to load the correct style sheet depending on the locale:
    function phptemplate_stylesheet_import($stylesheet, $media = 'all') {
      $rtl = in_array(locale_initialize(), array('ar', 'fa', 'he', 'ur'));
      if (!$rtl) {
        return theme_stylesheet_import($stylesheet, $media);
      }
      if ($stylesheet == base_path() . 'misc/drupal.css') {
        $stylesheet = base_path() . 'misc/drupal-rtl.css';
      }
      if ($stylesheet == base_path() . path_to_theme() . '/style.css') {
        $stylesheet = base_path() . path_to_theme() . '/style-rtl.css';
      }
      return theme_stylesheet_import($stylesheet, $media);
    }
  2. I modified the direction in the file style-rtl.css file that is supposed to get loaded when the locale is right to left like this:
    /* rtl */
    body {
      direction: rtl;
      /* text-align: right; */
  3. in that same file, I replaced each occurance of float: left to float: right

as you can see at www.nattiq.net the site looks lovely in the english locale, and most of I wanted to achieve in the arabic one also is looking good, except for the issue of the right hand block, it displays after some space. and, isn't this side bar, according to the code, supposed to be at the left hand side when the language is arabic?

can somebody look at the code and give me some ideas? I would be grateful for any. does it look the same way in browsers other than internet explorer? the link is: www.nattiq.net

Mohammed al-shar'

Nattiq technologies

Comments

Hi there
we have a growing drupal community in Israel that facing the rtl problems
I myself have converted internet_services theme to rtl, but i have changed the whole theme to rtl
I guess you can not read hebrew so the site wont help you too much :-) ...
but you can download it from http://www.drupal.org.il/system/files/internet_services_rtl.tar

if you want it both rtl & ltr, there is more work to be done, When I will have the time i will do it ...
as you can see here my site uses this theme http://dev-art.net

more rtl themes you can see here http://www.drupal.org.il/hebrew-themes, guess by the attachment name ...
you can even post a comment there, it would be nice to cooperate

If you have more questions you can contact me via this site user contact form

Avior
http://dev-art.net

hi!

thanks alot! it did work, I managed to make it both rtl and ltr at the same time!

I even guess that we can co-operate to make all the themes on the site http://www.drupal.org.il/hebrew-themes,
rtl and ltr.

check out my page to see that in action: www.nattiq.net

Mohammed al-shar'

Nattiq Technologies

Mohammed al-shar'

The Explorer