Re: authoring @lang and @dir (was 3.6. The root element)

On Aug 1, 2007, at 10:20 PM, Sander Tekelenburg wrote:

>
> At 01:18 -0500 UTC, on 2007-08-01, Robert Burns wrote:
>
>> On Jul 31, 2007, at 2:33 AM, Sander Tekelenburg wrote:
>
> [...]
>
>>>> There I think the direction is very dependent on the language.
>>>> [...] Once @lang is there, @dir can be computed accordingly.
>
> [...]
>
>>> One language
>>> can be expressed in different scripts, so can have different
>>> directionalities. [...]
>>> <http://en.wikipedia.org/wiki/Romanization_of_Hebrew#Modern_uses>.
> [...]
>>
>> That is a good example. However, the RFC 3066 language codes allow
>> one to specify both language and different script variants. So Hebrew
>> written with the Latin script could be designated by lang='iw-
>> LATN' (dir='LTR'); standard Hebrew as lang='iw' (dir='RTL'); Turkish
>> as lang='tr-LATN'; and Turikish in Arabic as lang='tr- 
>> Arab' (dir='RTL').
>
> Doesn't that merely mean that a script's directionality can be  
> expressed
> through the language code? I'm not sure how that makes it possible  
> for an
> authoring tool to deduce the scripts directon from the user  
> providing the
> content's language. (Or perhaps that's not what you meant.)

I'm not really sure what you're asking. But what I'm trying to say is  
that fully expressing a language using @lang or @xml:lang provides  
all of the information required to deduce the directionality. So to  
take just one of the examples I gave above:

  lang='iw-LATN'=> dir='LTR'

In that case the @dir attribute is technically redundant. I'm not  
saying that UAs work that way now. Rather I'm saying that by  
specifying language (including the specification of unconventional  
scripts), all the information is there to determine directionality.  
For some languages what demarcates the unconventional script may be  
up for debate and can even be a political football. If the web was  
around a century ago or so when Turkey was imposing a change from  
Arabic to Latin script, it would be difficult to say which was the  
conventional script. It would probably require specifying precisely  
which one was in use either way (if the government permits it).

Again, though having @dir as a separate attribute saves UAs from the  
need to process language codes to determine directionality. It also  
is more flexible in the sense that an author can specify only @dir  
and leave @lang unspecified. Or specify @dir and @lang but provide  
only the primary language code with no script code. Doe that answer  
your question?

Take care,
Rob

Received on Thursday, 2 August 2007 03:54:15 UTC