Re: Html dir attribute

2006-11-14 Thread Johan Compagner

sight.. why not stick to one standard  ;)

On 11/14/06, Iman Rahmatizadeh [EMAIL PROTECTED] wrote:


Yeah thats it. Numbers are LTR  text is RTL.





Re: Html dir attribute

2006-11-13 Thread Eelco Hillenius

This would be the minimal thing to make a RTL language look ok.
Japanese for instance is a LTR language (like English and German are).

Eelco


On 11/13/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:

I'm not sure. Isn't it that the whole form / page layout require
changes to make it look right. Same is true for japanese etc. That is
why we allow for per locale properties file.

Juergen

On 11/13/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Hi,

 I converted the form input example this weekend so that it uses one
 page and a properties (or xml) file per supported locale. One problem
 I have to fix is the fact that Persian (fa IR) is a 'left-to-right'
 language (see http://www.i18nguy.com/markup/right-to-left.html).

 Now, it kind of sucks to have to use a separate markup file for just
 to insert this tag:

 html dir=rtl (or html xmlns=http://www.w3.org/1999/xhtml; dir=rtl)

 I was thinking, maybe we could do this automatically. What we could do is 
this:
 * recognize the html tags so that we can access them later (much
 like we do with the head tags now);
 * have a getDir or getDirection method in WebPage that works like this:
 - If it returns LTR or RTL, a dir attribute is set on the html tag;
 - if it returns null and the locale is LTR, nothing is done
 - if it returns null and the locale is RTL, dir=rtl is set on
 the html tag.

 WDYT?

 Eelco




Re: Html dir attribute

2006-11-13 Thread Iman Rahmatizadeh

I guess this should work ok, so this way pages written previously wont be
harmed, and we have support for programmatically setting the direction.
Eelco, wouldn't you consider adding the method to Component instead of
WebPage ?

On 11/13/06, Eelco Hillenius [EMAIL PROTECTED] wrote:


This would be the minimal thing to make a RTL language look ok.
Japanese for instance is a LTR language (like English and German are).

Eelco


On 11/13/06, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 I'm not sure. Isn't it that the whole form / page layout require
 changes to make it look right. Same is true for japanese etc. That is
 why we allow for per locale properties file.

 Juergen

 On 11/13/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Hi,
 
  I converted the form input example this weekend so that it uses one
  page and a properties (or xml) file per supported locale. One problem
  I have to fix is the fact that Persian (fa IR) is a 'left-to-right'
  language (see http://www.i18nguy.com/markup/right-to-left.html).
 
  Now, it kind of sucks to have to use a separate markup file for just
  to insert this tag:
 
  html dir=rtl (or html xmlns=http://www.w3.org/1999/xhtml;
dir=rtl)
 
  I was thinking, maybe we could do this automatically. What we could do
is this:
  * recognize the html tags so that we can access them later (much
  like we do with the head tags now);
  * have a getDir or getDirection method in WebPage that works like
this:
  - If it returns LTR or RTL, a dir attribute is set on the html
tag;
  - if it returns null and the locale is LTR, nothing is done
  - if it returns null and the locale is RTL, dir=rtl is set on
  the html tag.
 
  WDYT?
 
  Eelco
 




Re: Html dir attribute

2006-11-13 Thread Iman Rahmatizadeh

Yeah thats it. Numbers are LTR  text is RTL.

On 11/14/06, Eelco Hillenius [EMAIL PROTECTED] wrote:


On 11/14/06, Iman Rahmatizadeh [EMAIL PROTECTED] wrote:
 I guess this should work ok, so this way pages written previously wont
be
 harmed, and we have support for programmatically setting the direction.
 Eelco, wouldn't you consider adding the method to Component instead of
 WebPage ?

Well, the thing is that adding it yourself to a component (attribute
modifier) or tag is easy enough, while the key thing I wanted to
achieve here is that in a case like FormInput, you don't have to have
a separate markup file for RTL locale just in order to get the dir
attribute in the html tag.

An exception where it makes sense to put in a component is the example
you gave for text fields. Numeric text fields in RTL locales should be
LTR, correct? Are there any other of such cases?

Eelco