Re: CSS2.1 :lang

[appologies to the style folks for leaving them out of part of
the interchange because of a typo]

At 10:48 03/10/17 +0300, Jukka K. Korpela wrote:
>On Thu, 16 Oct 2003, Martin Duerst wrote:
>
> > At 17:36 03/10/16 -0400, Jukka K. Korpela wrote:
> >
> > >By the HTML 4.* specification, the default value of the lang attribute is
> > >unknown. This is really mystical, but it seems to postulate that there
> > >_is_ a default value.
> >
> > This seems to be just some unlucky choice of words for the simpler
> > "In the absence of any lang attribute, the language is unknown."
>
>Actually that wouldn't be a much better formulation. It could be seen as
>stating the obvious, and this always raises some questions. Would it mean,
>for example, that a user agent should regard the language as unknown,
>despite possibilities of running some simple analysis on the text (as e.g.
>Google does), and guessing the language from it? If, in contrast, it would
>just say that in the absence of declared language information, there is no
>declared language information, does it need to be said?
>
>It would have been useful (and might still be useful for XHTML) to specify
>a default value of "und", if only to make it explicit that English is
>not the default, i.e. texts in English should carry language information
>too. (This is obvious to anyone who thinks about it, but maybe not so for
>the majority of people who author in English.)

These are a lot of good questions. Given the above considerations,
what exactly would *you* write?


> > I think the most useful way to use it in CSS is to specify fonts.
> > There are only very few fonts that cover a reasonably complete
> > subset of Unicode; specifying different fonts for text pieces
> > in different languages/scripts brings in a lot more possibilities.
>
>That makes sense. But it doesn't make :lang any more supported.
>Besides, you would have to be _very_ careful when formulating such things
>for the great majority of authors, who are either completely disinterested
>or will misunderstand the idea as the idea of extending character
>repertoire with font settings (you know, <font face="Symbol">).

Good point, although fortunately, current implementations will
crush such ideas early.


>Besides, do we really need language selectors for that? Normally languages
>should not be mixed on a page,

There are many cases where it's better to have separate pages.
There are also many cases (probably less) where languages are
mixed in a page. It may also be that a stylesheet is used for
many different pages, potentially in different languages.


>and if they are, authors who wish to
>consider font issues should try and find _a_ font that is suitable for all
>text on the page, or a list of such fonts.

Doesn't always work that easily, because a list of fonts establishes
a clear priority. A good example where simple priorities don't work
would be Chinese and Japanese. Also, if you want to have several
fallback fonts per language or script, things could get quite heavy.


>It's not a big
>issue if the author needs to add some class attributes in order to
>construct suitable selectors.

Yes, but it's even better if an existing attribute can be reused.


Regards,    Martin.

Received on Friday, 17 October 2003 14:48:52 UTC