W3C home > Mailing lists > Public > www-style@w3.org > March 2002

Re: CSS3 - Define Language

From: Bert Bos <bert@w3.org>
Date: Fri, 15 Mar 2002 14:13:57 +0100
Message-ID: <15505.62357.74977.709801@jfouffa.inria.fr>
To: "Tyler Rasmussen" <rasmo2000@hotmail.com>
Cc: www-style@w3.org
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 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

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:01 UTC