LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 06-01-2007, 03:02 PM   #1
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Rep: Reputation: 35
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
 
Old 06-01-2007, 06:01 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,376

Rep: Reputation: 147Reputation: 147
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.
 
Old 06-02-2007, 03:15 AM   #3
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Original Poster
Rep: Reputation: 35
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?
 
Old 06-02-2007, 06:17 AM   #4
rblampain
Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 7
Posts: 833

Original Poster
Rep: Reputation: 35
I have tried it with <td class="rtl"> tags and it works well.
Thank you.
 
Old 06-03-2007, 05:22 PM   #5
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,376

Rep: Reputation: 147Reputation: 147
You can also use the html tag span
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
offline dictionary english-arabic hammam12 Linux - Software 4 12-28-2011 10:41 PM
read english and arabic in terminal gamor Mandriva 2 04-23-2007 03:48 PM
reading both english and arabic in mandriva2007 terminal gamor Linux - Newbie 2 04-23-2007 11:31 AM
can't view html pages in IE thisObject Linux - Software 4 05-07-2006 10:55 AM
Cookie Sharing Between CGI generated HTML pages and standard HTML pages rkwhited Linux - Newbie 5 08-15-2004 07:39 AM


All times are GMT -5. The time now is 02:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration