W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2009

Re: [widgets] element-based localization

From: Marcos Caceres <marcosc@opera.com>
Date: Mon, 30 Nov 2009 22:33:31 +0100
Message-ID: <b21a10670911301333y3f6bf08fs14ce45bd1749b8aa@mail.gmail.com>
To: Robin Berjon <robin@berjon.com>
Cc: "cyril.concolato" <cyril.concolato@telecom-paristech.fr>, public-webapps <public-webapps@w3.org>
On Mon, Nov 30, 2009 at 3:41 PM, Robin Berjon <robin@berjon.com> wrote:
> On Nov 27, 2009, at 20:55 , Marcos Caceres wrote:
>> On Thu, Nov 26, 2009 at 2:40 PM, Cyril Concolato
>> <cyril.concolato@enst.fr> wrote:
>>> I'm trying to implement the element-based localization and I found the spec
>>> unclear with regards to the inheritance of th xml:lang attribute and I would
>>> like to propose some improved text.
>>> First, this attribute is listed as an optional attribute of the widget
>>> element but the widget element is not localizable, so one does not
>>> understand why.
>> D'oh! that should be a "localizable: yes". Thankfully, that's there
>> for author clarification.
> Really? I wouldn't have thought so. There's a difference between "you can have xml:lang there" and "it is meaningful to have xml:lang there (or on its ancestors)". You can have xml:lang on widget, but the widget element cannot really be localised (you can't have two, choosing between them depending on locale). It's not a huge difference, but putting "localisable: yes" on widget would confuse me.


>> I've added this to the editor's draft:
>> "As part of their definition, the XML elements of the configuration
>> document are marked as being localizable via xml:lang with either the
>> word "yes" or "no". An author can use the xml:lang attribute on any
>> XML element, including any element in the widget namespace. During
>> Step 7, the user agent will apply the standardized behavior of
>> xml:lang specified in the [XML] specification (i.e. inheritance and
>> propagation of the xml:lang attribute will occur on child elements on
>> which it was not explicitly used - see example below to see how this
>> inheritance and propagation works). Regardless of whether xml:lang was
>> inherited or explicitly used in an element, a user agent will only use
>> the value of an xml:lang attributes for the purpose of element-based
>> localization in Step 7 when that element was explicitly marked with
>> the text "Localizable via xml:lang: Yes" as part of that elements
>> definition."
>> WDYT?
> I think that this is even more confused than the original :) To clarify, I think you need to make the same distinction I made above re "can have xml:lang" and "supports being localised". Otherwise you get sentences like "elements of the configuration document are marked as being localizable via xml:lang with either the word "yes" or "no". An author can use the xml:lang attribute on any XML element", to which I can only reply "ebbeh?".
> How about:
> """
> The xml:lang attribute can be used on any element in order to indicate which language is used in the content and attribute values of that element. Its value is inherited, such that if an element has an xml:lang attribute, all of its descendants are considered to be in that language as well, unless they specify their own xml:lang attribute. Note that an element can indicate that it is in no specific language by setting xml:lang to the empty string, irrespective of whether any of its ancestors has an xml:lang attribute.
> Some of the elements in the widgets namespace are defined to be localisable. This means that they will be processed in a specific manner if they have an xml:lang value (directly or through inheritance), as described in detail in Step 7.
> """

I *really* like it; you never fail to impress Mr Berjon :) ... but the
first para should just be a "Note:" (we don't want to have that in as
normative text because it describes behavior specified in the XML
spec... hence, I would add "as specified in [XML], bla bla bla"). The
second paragraph can serve as a normative definition to which all
"localizable via xml:lang" link to. Can you live with that?

If you can, I have added the above to the spec. With that, we are
ready to go to CR so please give me your consent.

Marcos Caceres
Received on Monday, 30 November 2009 21:34:30 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:21 UTC