Posted by mohammed76 on December 14, 2006 at 9:29pm
hi.
in drupal 4.7.4 a theme was done that supports right to left languages including Arabic and Hebrew. that theme was called bidi. not sure about drupal 5.
however it should be easy to do if you follow the following steps to customize any php template based theme.
copy your style.css file and rename it to become: style-rtl.css so that you have both style.css and style-rtl.css in your theme directory.
put the following at the beginning of your new style-rtl.css file:
/* rtl */ body { direction: rtl; text-align: right; }
in your template.php file add the following function:
Posted by mohammed76 on December 15, 2006 at 8:34am
hi.
in such a case you just create a file called template.php with the mentioned function in it. make sure you start the file with the proper php <?php and close it with ?> and put it inside of your theme directory. in your case put it in themes/fancy
I am using Drupal %.1 to create a magazine in Arabic, and every time i apply the RTL to the template the bullet points go all over the place, i was wondering if anyone could help?
in drupal 5.x the above mentioned function won't work. you need to play abit with your page.tpl.php file to achieve the result you're asking for. could you post back and tell us more details? what theme are you trying to customise, do you need bidi functionality or is it going to be arabic only? etc.
I am using drupal 5.1 and have a site that's main language is in english, but has translations to arabic and french. I am using the localizer module to switch languages and using the theme, aberdeen, which I am reluctant to change since I like the look and have spent a long time tweaking the css to make it look good.
My problem is that all the arabic in the posts are written left to right, with the periods at the beginning of the sentence. I inserted a HTML code to correct it, but I am looking for a nicer, and easier, way to do this since there will be other users updating the website that don't know HTML coding. I hope I can do it without changing the theme.
Since it is a multilingual site and is set up on drupal 5.1, I can't find any fix to this problem in the forums. Do you have any suggestions?
Thanks for mentioning that the above function won't work with 5.x because I'd been knocking my head of my PC trying to make it work.
I am trying to rtl "any" theme to work with drupal 5.x . The bidi theme doesn't function (no rtl at all) as it seems to be still not upgraded. The garlandrtl is still buggy in IE.
I was trying to rtl the garland theme as I like it and I need a three-column theme. I would really appreciate your help if possible. I am not fussy about the theme as long as it is three-column so if you think it'd be easier to start with another theme that's fine. Also although I prefer having a bidirectional functionality, if this is a hassle it's fine to have just the rtl then.
thanks
by the way, your site looks so good (are you runing 5.x ??)
actually the garlandrtl theme appears to be a little buggy in internet explorer. lets have a chat on your choice of messangers to try to help with some other theme. drop me a message using my contact form.
I'm running Drupal 5.1, using it for a static webpage. Someone in the forum mentioned that he was able to change the alignment and text properly using HTML code.
Can you please specify what exactly you have done to correct RTL and points.
Comments
you need to call a different style sheet
hi.
in drupal 4.7.4 a theme was done that supports right to left languages including Arabic and Hebrew. that theme was called bidi. not sure about drupal 5.
however it should be easy to do if you follow the following steps to customize any php template based theme.
/* rtl */body {
direction: rtl;
text-align: right;
}
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 = '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);
}
Hope this helps
Mohammed al-shar'
The Explorer
NICE!
this is nice! i have been wondering how to do this for a bit!
i m trying it out right now but the theme i m using (fancy) doesnt have a template.php.
i know some of the other do have the file but not this theme. whats the recommended action?
thanks
__________
http://namima.in-egypt.net اجدد اخبار ممثلين
http://www.echognumix.com
create one
hi.
in such a case you just create a file called template.php with the mentioned function in it. make sure you start the file with the proper php
<?phpand close it with?>and put it inside of your theme directory. in your case put it in themes/fancyMohammed al-shar'
Nattiq Technologies
Mohammed al-shar'
The Explorer
HI Thanks for replying. I
HI
Thanks for replying.
I tried the changes on the "news portal" and there was no difference .
If I just change the text-align:left to right it help in some way.
Eran
Drupal 5.1
I am using Drupal %.1 to create a magazine in Arabic, and every time i apply the RTL to the template the bullet points go all over the place, i was wondering if anyone could help?
THankz
in 5.1 it's a different story
hi.
in drupal 5.x the above mentioned function won't work. you need to play abit with your page.tpl.php file to achieve the result you're asking for. could you post back and tell us more details? what theme are you trying to customise, do you need bidi functionality or is it going to be arabic only? etc.
Mohammed al-shar'
Nattiq Technologies
Mohammed al-shar'
The Explorer
customizing a theme for rtl arabic text
I am using drupal 5.1 and have a site that's main language is in english, but has translations to arabic and french. I am using the localizer module to switch languages and using the theme, aberdeen, which I am reluctant to change since I like the look and have spent a long time tweaking the css to make it look good.
My problem is that all the arabic in the posts are written left to right, with the periods at the beginning of the sentence. I inserted a HTML code to correct it, but I am looking for a nicer, and easier, way to do this since there will be other users updating the website that don't know HTML coding. I hope I can do it without changing the theme.
Since it is a multilingual site and is set up on drupal 5.1, I can't find any fix to this problem in the forums. Do you have any suggestions?
drupal 5.x changing any 3-col theme to rtl
Hi nattiq
Thanks for mentioning that the above function won't work with 5.x because I'd been knocking my head of my PC trying to make it work.
I am trying to rtl "any" theme to work with drupal 5.x . The bidi theme doesn't function (no rtl at all) as it seems to be still not upgraded. The garlandrtl is still buggy in IE.
I was trying to rtl the garland theme as I like it and I need a three-column theme. I would really appreciate your help if possible. I am not fussy about the theme as long as it is three-column so if you think it'd be easier to start with another theme that's fine. Also although I prefer having a bidirectional functionality, if this is a hassle it's fine to have just the rtl then.
thanks
by the way, your site looks so good (are you runing 5.x ??)
yes it is
hi.
yes my site is running 5.1
actually the garlandrtl theme appears to be a little buggy in internet explorer. lets have a chat on your choice of messangers to try to help with some other theme. drop me a message using my contact form.
Mohammed al-shar'
Nattiq Technologies
Mohammed al-shar'
The Explorer
correction of arabic using HTML
Hello,
I'm running Drupal 5.1, using it for a static webpage. Someone in the forum mentioned that he was able to change the alignment and text properly using HTML code.
Can you please specify what exactly you have done to correct RTL and points.
Thank you