"Lars G. Svensson" <svensson@dbf.ddb.de> wrote:
[color=blue]
> I had similar problems a while ago when I wanted to have an <abbr>
> spelled (spelt? Are there any teachers around) out in one language
> while having the title attribute read out in another. I guess I
> would need some kind of titlelang attribute too (a bit like
> hreflang), in order to specify that.[/color]
For current HTML, the theoretical answer would be
<abbr title="..." lang="..."><span lang="...">...</span></abbr>
since the lang attribute specifies the language of element content
_and_ of all attributes. Rather impractical.
[color=blue][color=green]
>> But don't expect much. Very few browsers or programs care anything
>> about lang or xml:lang attributes at all,[/color]
> The argumentation, not to care for or use some kind of markup only
> because UAs don't (yet) support it, always leaves me feeling
> uneasy.[/color]
I would feel uneasy if people spent their time and energy with adding
markup that is practically almost useless - unless they have been told
what the situation is and they have made an informed decision.
[color=blue]
> We really try to do the *proper* thing, don't we. I try to
> produce html which is valid now and in two, ten or a hundred years.[/color]
There's no guarantee that your HTML will be valid according to the W3C
recommendation next week even if you obey the spirit and letter of
every current recommendation. In fact, the lang attribute is being
deprecated in favor of xml:lang. Next year they could deprecate both in
favor of something fancier.
[color=blue]
> Browser support will come eventually, I'm sure,[/color]
Will it?
And in fact, the language markup system is poorly designed, in addition
to being virtually unimplemented. My detailed description of this is
available in Finnish only, so I'll just point out an apparent problem -
a small but symptomatic problem. The HTML specification says that the
default value of the lang attribute is unknown. That's very sloppy
language (pun intended). Does it mean that the default value is the
literal string "unknown"? Apparently not, since that would not comply
with the specifications that the HTML specs refer to; they use "und"
(for 'undetermined'). So it seems to say that there _is_ a default
value, but it is unknown - to whom? to anyone? What sense could this
make? What's the use of a default value, if it is unknown? I think I
can guess what they actually meant, but they surely managed to avoid
saying it.
[color=blue]
> Also: WCAG Guideline 4
> <
http://http://www.w3.org/TR/WAI-WEBC...iated-and-fore
> ign> tells the html-writer to "clearly identify changes in the
> natural language of a document's text and any text equivalents
> (e.g., captions)." If I - for what reason whatsoever - need/want to
> conform, I *have* to mark up language changes, and in that case I
> have to care about attribute values in a language different from
> that of the element content, too. i18n is more difficult than I
> though.[/color]
But why would you want to conform with that requirement, which vividly
reminds me of Matthew 23:4 -? Even the WAI pages themselves do not
actually conform to WAI requirements, despite showing an icon that
claims such conformance. The page
http://www.w3.org/WAI/ even violates
the requirement of specifying the primary language - it would be
_extremely_ simple to add lang="en" into <html>, but they failed to do
even that, yet impose a much more difficult Priority 1 requirement of
specifying _all_ language changes (without trying to satisfy that
requirement on WAI pages, except casually).
Language markup, especially if applied comprehensively for all language
changes, is very difficult if you actually try to use it. As long as it
is described in very abstract terms only, it may look rather easy.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html