[Standards] I18N and disco#items
Matthew A. Miller
linuxwolf at outer-planes.net
Thu Nov 10 21:38:29 UTC 2011
On Nov 10, 2011, at 12:51, Mike Wacker wrote:
> On 11/9/2011 3:35 PM, Peter Saint-Andre wrote:
>> On 11/9/11 4:32 PM, Mike Wacker wrote:
>>> Since an item node for a disco#items query has a name attribute for a
>>> natural-language name, does that mean that item nodes should also have a
>>> corresponding xml:lang attribute?
>>> For disco#info queries, the potential need for an xml:lang attribute is
>>> called out in XEP-0030, section 3.1 [Basic Protocol for disco#info]
>>> (although it's never reference in the schema). But there's no mention of
>>> xml:lang at all in section 4.1 [Basic Protocol for disco#items].
>>> However, it wouldn't be too hard to find a context where the results of
>>> a disco#items query would be displayed to the user, which would seem to
>>> suggest internationalization is necessary here.
>> XMPP is an XML technology, thus xml:lang is allowed on any element. Naturally, we could add an example of that to XEP-0030.
> 4.4, Relationship Between an Entity and its Items, says that for one possible relationship, "Upon querying an entity (JID1) for items, one receives a list of items that cannot be addressed as JIDs; each associated item has its own JID+node, where each JID equals JID1 and each NodeID is unique."
> But if we account for xml:lang, then we would potentially need multiple items with the same NodeID but different languages, meaning NodeID will not be unique if we want to localize the item. This is similar to disco#info where (category, type, xml:lang) is the uniqueness key for an identity.
That would be a rather significant change to a draft specification. I know quite a few implementations that would break in there were a <item jid='darkcave at chat' name='A dark cave' xml:lang='en'/> and <item jid='' name='Anns dorcha uamh' xml:lang='gd'/>.
Unfortunately, I think we'll have to live with the inclusion of an xml:lang identifies the localization of that 'name' attribute value, but not extend it in the same way as <identity/>.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2238 bytes
Desc: not available
More information about the Standards