Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
codi #1
Member since Dec 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: ClientLanguage and <body xml:lang>
Hi,

maybe I missunderstood something. If I do, please correct me.

With XmppClientConnection.ClientLanguage set to "de".
If I receive the following XML:
<message xmlns="jabber:client" to="me@here.tld" type="chat" id="1117" from="someone@somewhere.tld/Gajim">
<body>London</body>
<body xml:lang='de'>Berlin</body>
</message>

The created messages Body property contains "London".
Shouldn't it be "Berlin", or am I completely wrong?

codi
Avatar
Alex #2
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
agsxmpp doesn't support multiple bodys with different languages currently. You have to parse it yourself.
Are there any existing clients which send data in multiple languages?

Alex
Avatar
codi #3
Member since Dec 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Not as far as i know, but haven't really searched for.

in my opinion it also makes not much seance for IM-clients, cause i know which language i've to choose, talking with contacts.... maybe useful for default presence-status. but for some automated tasks it could be really useful. such as news, reports and so on.

i was just browsing a little in xmpp-core definitions and stumbled over it and thought it would be a nice-to-have.
and because rfcs and my bad english is not a very trustful combination, i thought i should ask if its supported in a different way than using the Body-Property or i simply missunderstood it.

Thanks.
Avatar
Alex #4
Member since Feb 2003 · 4327 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes this is how it works in theory ;-)
But I have not seen any client, other software or xmpp library using this feature. We also had no requests for this feature yet, this is the reason why its missing in agsXMPP. Its also not trivial to support multiple languages because the lang attribute can be applied to any tag, not only the body. So I think to support it some code needs a rewrite.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS