RE: [widgets PC] i18n comment 20 : Misuse of xml:lang for localization flag

[Forwarding the relevant part of Addison's email as part of the original thread]

> To: art.barstow@nokia.com; ext Richard Ishida
> Cc: 'Felix Sasaki'; 'Marcos Caceres'; 'Robin Berjon'; 'Steven Pemberton'; 'Doug
> Schepers'; 'Charles McCathieNevile'; 'www-archive'
> Subject: RE: [widgets] Re: i18n comments:
> 
> Dear Art, et al,
> 
...
> 4. I personally disagree with Richard's comment #20 [2]. The empty language
> tag is related to locale fallback in that it represents the root of the locale
> hierarchy, a position you could fill with "i-default", save that that value doesn't
> play nicely with BCP 47 fallback. The xml:lang="" is the default content. I don't
> agree that this is "unlocalized", which is your description. See my comment #2
> above.
...
> Addison
> 
...
> Addison Phillips
> Globalization Architect (Lab126)
> Chair (W3C I18N, IETF IRI WGs)
> 
> Internationalization is not a feature.
> It is an architecture.
>


> -----Original Message-----
> From: public-i18n-core-request@w3.org [mailto:public-i18n-core-
> request@w3.org] On Behalf Of Richard Ishida
> Sent: 20 May 2010 18:14
> To: public-i18n-core@w3.org; public-webapps@w3.org
> Subject: [widgets PC] i18n comment 20 : Misuse of xml:lang for localization
> flag
> 
> Comment from the i18n review of:
> http://dev.w3.org/2006/waf/widgets/
> 
> Comment 20
> At http://www.w3.org/International/reviews/0907-widgets-pc/
> Editorial/substantive: S
> Tracked by: RI
> 
> Location in reviewed document:
> 7.16.1 [http://dev.w3.org/2006/waf/widgets/#example-of-usage9]
> 
> Comment:
> Note: I am marking this as closed straight away, since I believe it was not
> spotted early enough to be corrected. I am recording it here, however, in
> case it is useful for a future discussion.
> 
> 
> xml:lang should really only be used to indicate the language of content in an
> element. If you need to indicate something else, such as the locale for that
> content for localization purposes, you should use a different attribute. See <a
> href="http://www.w3.org/International/questions/qa-when-xmllang">xml:lang
> in XML document schemas</a>. Here not only is xml:lang used incorrectly
> for that reason, but xml:lang="" is defined to mean that this is the default
> locale, whereas the XML spec says that that should mean that the language
> of the content of that element is undetermined (see Tagging text with no
> language [http://www.w3.org/International/questions/qa-no-language]).
> 
> 
> It would have been better to use an attribute such as locale='en', locale='fr',
> or locale=''. This would be used alongside xml:lang. The former would
> indicate how to process the document, the latter would be useful for things
> like spell-checking, voice browsers, etc that need to understand the language
> of the text they are processing.
> 
> 
> This would simplify the code in the example in section 7.16.1. Instead of:
> 
> 
> <name xml:lang="" dir="ltr"><span xml:lang="en">GPS
> Weather!</span></name>
> 
> 
> you could simply use
> 
> 
> <name locale="" xml:lang="en" dir="ltr">GPS Weather!</name>
> 
> 
> 
> 
> ============
> Richard Ishida
> Internationalization Lead
> W3C (World Wide Web Consortium)
> 
> http://www.w3.org/International/
> http://rishida.net/

Received on Friday, 28 May 2010 06:51:53 UTC