-   Programming (
-   -   creating HTML pages with mix of English & Arabic (

rblampain 06-01-2007 03:02 PM

creating HTML pages with mix of English & Arabic
I am creating web pages with contents in every languages that Google can translate from English (including Asian languages), plus some English text.

I have used "Gedit" to construct the mix of the text and everything renders well.

I don't anticipate any problem when the mix of languages in an HTML document is from languages written from left to right (Russian & English etc) but I thought a mix of English and Arabic (right to left) could be interesting and I decided to test that combination first.

I am reading a file one line at a time with a BASIC routine and enclosing it within HTML tags and, as I expected, the arabic text is reversed.

Before I spend (possibly considerable) time working out the details of what is happening, I thought I would ask if anyone has experience with this and is able to pass a few tips.

Perhaps reversing the characters in my BASIC routine is not the solution. Perhaps there are other things I should know.

Thank you for your help

graemef 06-01-2007 06:01 PM

Use the css attribute direction for each language. For Aribic scripts set it to rtl for others set it to ltr. I tend to wrap everything in a div with just the direction attribute for each language.

rblampain 06-02-2007 03:15 AM

Thank you for your answer. This should apply at the line level, for example a city or town is listed in English and in Arabic on the same line.

I suppose I could divide the screen vertically into 2 <table> and give the correct direction attribute to each. Would that be the answer?

rblampain 06-02-2007 06:17 AM

I have tried it with <td class="rtl"> tags and it works well.
Thank you.

graemef 06-03-2007 05:22 PM

You can also use the html tag span

All times are GMT -5. The time now is 08:47 AM.