[JDEV] Internationalization

Julian Missig julian at jabber.org
Sun Nov 4 13:06:10 CST 2001


Well, I suggested a *long* time ago that the initial stream:stream 
should carry an xml:lang attribute, which the server can then identify 
the language of a session with (and if we want to get more complicated, 
we can allow xml:lang anywhere in the session - if they do an iq request 
with an xml:lang different from the session xml:lang, the response 
should be in the same xml:lang... but that might be a bit much).

The only "issue" with xml:lang is that in the examples in the XML 
recommendation they use "de-DE" instead of "de_DE".

Other than that, this is precisely what xml:lang is meant for, and I see 
no reason not to make that the attribute we use.


Reading you message again... if the xml:lang is done on the initial 
stream:stream, then the server can tack on xml:lang to the <presence> 
and <message> in two cases:
* if it's leaving this server, then the other server can determine if 
xml:lang is necessary
* if it's staying on the same server, it can determine if the other user 
is in the same xml:lang or not

This way, clients would see xml:lang only if it's *different* from their 
specified xml:lang.

There are several ways to do this, I just want to see xml:lang specified 
with the initial stream connection (or maybe authentication), and would 
like it if the client didn't have to tack on xml:lang to everything, 
following the "let the server do the work" philosophy.

Julian
-- 
email: julian at jabber.org
jabber:julian at jabber.org

Max Horn wrote:

> It is really time there was more I18n stuff in Jabber. Most important is 
> stuff like the "help" text supplied by iq:register, or the text used in 
> iq:gateway.
> 
> 
> I think we should standarize an attribute that can carry a locale, in 
> this wonderfuly normed format, e.g. I could use de_DE. This would be 
> used in various places:
> 
> * in <presence> to indicate the prefered locale of the client.
> * in <iq> to indicate the desired locale for e.g. iq:register / iq:gateway
> * possibly even for <message> to denote the language a give message was 
> written in, although i fail right now to see much purpose behind this 
> (well maybe if we couple it with automatic translation :)
> 
> 
> GC would also take advantage of this to locaize messages like "foo is 
> now known as bar" or "quux has changed the subject to Test".
> 
> 
> 
> Max





More information about the JDev mailing list