In order to support languages that read right to left some changes must be made. I have already committed a RTL image and stylesheet. There is also a bug that causes node counts to malfunction when using a RTL language which needs a fix.
Image and stylesheet added and committed to 6.x-2.x-dev and 5.x-2.x-dev.
Comments
Comment #1
xanoPagers are RTL now too. Still looking for a solution for RTL support in Drupal 5. Perhaps using i18n?
Comment #2
good_man commentedHey,
First of all some facts about RTL and how browsers render them:
when writing from right to left (RTL), you must use (direction:rtl;) in body or html class in your style file, like in Garland theme (style-rtl.css). Also, if you wrote Arabic words (Arabic is RTL) and you used parentheses, the parentheses will appear in the opposite order. for example shift+9 gives you the opening parenthesis ( ,but when writing in RTL it gives you the closing one ) . and vice versa.
This is a problem, because when you write English word and you used parentheses in RTL, they will appear as LTR but in RTL. yeah, it's hard to understand but I'll explain:
for example I'm using RTL now in my web site and I wanted to show this: a (1). if I write this in my web site it'll not look okay except if I changed it to LTR from CSS, Look at this to understand it better:
http://drupal.holooli.com/?q=dictionary
the first three terms are English letters, the second set are Arabic. I turned node count on, so what happens. English letters and the parentheses for node count don't appear in the right order. try changing the direction using firebug to LTR and they'll look okay. the second set appear well, because it's an Arabic letter followed be the parentheses (remember in RTL the opening parenthesis is the closing one in LTR and vice versa).
so what should we do. the best solution is either don't write English terms in Taxonomy and this is very bad, because sometimes you have to include English terms in your RTL site, or we should change parentheses in node count to something else.
Comment #3
xanoI think I got it. There was one thing I found very strange when looking at a simple Drupal site using Garland and using a language set to RTL: periods and other punctuation were moved to the beginning of each line. If you are using an actual RTL language this is OK, but in my test case I was using English, which made it look like some kind of bug. After some testing I realised only the last set of punctuation characters of a sentence would be put at the beginning of the line it was on. Since browsers obviously see parentheses as punctuation closing parentheses are being changed position when using node counts.
So our new question is how we prevent this from happening.
I tried to put a <span> with dir="rtl" around the node count like this:
This code worked perfectly and made sure that whatever the term names were, the node count parentheses stayed intact. However, what about term names that contain both Western characters _and_ punctuation?
Comment #4
good_man commentedall right, inline style do it ,but CSS can not.
except an extreme case like: H (letter)
http://drupal.holooli.com/?q=dictionary
Comment #5
xanoThat's what I meant. There is a problem as soon as term names contain punctuation.I'm still trying to figure out a way to solve this.
Comment #6
xanoI used the following code to make sure node counts are displayed correctly:
$dir is a variable passed on to the theme function that contains either 'rtl' or 'ltr' depending on the text direction of the currently used language.
There is no patch, but the code does need review. Please test it by using the latest 6.x-2.x-dev.
Comment #7
good_man commentedGood, and there is no way to prevent the English terms with punctuation.
Comment #8
xanoCould you do some more tests to make sure Vocabulary Index works on RTL sites?
Comment #9
good_man commentedI did some tests on localhost and it works well ... what do you want exactly?
Comment #10
xanoI want it to work with RTL sites as good as it works with LTR sites. As far as I can see it does, but I only use LTR languages. You use RTL more than I do, so perhaps you can test it better too.
Comment #11
xanoI have removed the RTL CSS file. It wat only necessary for the background images, but they are no longer being used.
Comment #12
good_man commentedso now it's working without it?
sorry for being late, but the site I was working on is postponed!
Comment #13
xanoThere are now still some RTL-measures, but none related to CSS since those measures were only applied to lists with custom list-style-images, which aren't being used anymore.
//Edit: Could you please test some more using a test site?
Comment #14
good_man commentedI'll try, but give me some days ;)
Comment #15
good_man commentedI use the newest development version nov/5, and it's working great ... thanks for your efforts and excuse me
Comment #16
xanoThat's good to hear. Thank you very much for testing!
Comment #18
xano