Re: CSS3 - Define Language

Tyler Rasmussen writes:
> I am currently working on a webpage using HTML and CSS for a forgiegn 
> language class at my school.  I find it very annoying to have to type:
> 
> <DIV class="es" lang="es"></DIV>
> <DIV class="en" lang="en"></DIV>
> 
> Over and over again.  I think it would work wonders for pages like this if 
> you could define the language of text inside a certain tag by the CSS 
> document.  I mean, really, language is part of the style of the document.

I agree that a CSS-type language would be a convenient means of
attaching general properties to elements, including a language
property, but I do not agree that language is a matter of style.

In other words, it is easy to imagine a language that uses CSS's
syntax and rules for cascading and inheritance to attach all kinds of
useful information to elements:

    DIV.es {
        language: es;
        pretty-print: keep-linebreaks;
        modifiable: no;
        auto-next-element: DIV.es;
        namespace: url(http://...);
        icon: url(generic.png);
        opaque-drag-and-drop: semi-transparent;
    }

but I don't think 'language' is a style attribute. Would you expect
something to change in the display of an element if you change the
language? You can say that "typically" an English document looks
different from a Japanese one, but is there something concrete that
results from the language?

(Well, maybe in a hundred years, setting 'language' to 'es' could
cause the browser to translate the element to Spanish on the fly...)

We *will* have a 'script' property in CSS3, because interpreting the
text according to a certain script results in precise differences in
the algorithms that are applied. It may seem that script is related to
language, but the relation is vague enough and has so many exceptions
that so far it has turned out to be better to regard them as
independent for the purposes of CSS.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Friday, 15 March 2002 08:14:02 UTC