W3C home > Mailing lists > Public > www-html@w3.org > March 2007

Tags for aligning in both Left To Right and Right To Left directions properly.

From: Wouter Wessels <wwessels@xs4all.nl>
Date: Wed, 7 Mar 2007 18:40:42 +0100
Message-Id: <3B0437C3-EB11-42B4-91C8-2FF6B2D43767@xs4all.nl>
To: www-html@w3.org

Hi everybody,

For a while now, I have been working on a website that should be  
viewable in both English and Arabic.
While working on that I could not find an align value that allows me  
to design a page that would align left in Western languages and right  
in Arabic languages.
To do that, I had to create my own taglib that checks the locale of  
the request and, based on that locale, decides what to do with the  
alignment.

When you align a piece of text 'left' in an Englis page, chances are  
you want it aligned 'right' in an Arabic page.

How wonderful would the world be if there were 2 extra values that  
one could use in the align argument in for instance <td  
align="something"> </td>

I was thinking of:
<p align="start"></p>	to align the paragraph towards the 'start of  
the sentence'
<p align="end"></p>	to align the paragraph towards the 'end of the  
sentence'

Or ... even better in a Cascading Stylesheet manner:

p {
   text-align=start
}
if you want the text to be aligned to the left in Western pages, and  
to the right in Arabic pages.

Naturally, this would only be sensible when using it in conjunction  
with language files ... like this:

<p align="start"><i18n:message key="myKey"></p>

Please give me your thoughts on this ...

Thanks for your time,
Wouter
Received on Wednesday, 7 March 2007 18:33:11 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:08 GMT