summaryrefslogtreecommitdiff
path: root/sleekxmpp/clientxmpp.py
diff options
context:
space:
mode:
authorLance Stout <lancestout@gmail.com>2012-06-05 16:54:26 -0700
committerLance Stout <lancestout@gmail.com>2012-06-18 22:00:33 -0700
commit181aea737d5bce9479795b58c29b5a92da3bd48b (patch)
tree75fed30d668542593e12a208bc88775c19d6d6b6 /sleekxmpp/clientxmpp.py
parentee702f40710219290508f95ac01df50a96d04f3c (diff)
downloadslixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.gz
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.bz2
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.tar.xz
slixmpp-181aea737d5bce9479795b58c29b5a92da3bd48b.zip
Add initial support for xml:lang for streams and stanza plugins.
Remaining items are suitable default actions for language supporting interfaces.
Diffstat (limited to 'sleekxmpp/clientxmpp.py')
-rw-r--r--sleekxmpp/clientxmpp.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/sleekxmpp/clientxmpp.py b/sleekxmpp/clientxmpp.py
index 94ced031..8a941867 100644
--- a/sleekxmpp/clientxmpp.py
+++ b/sleekxmpp/clientxmpp.py
@@ -60,8 +60,8 @@ class ClientXMPP(BaseXMPP):
:param escape_quotes: **Deprecated.**
"""
- def __init__(self, jid, password, ssl=False, plugin_config={},
- plugin_whitelist=[], escape_quotes=True, sasl_mech=None):
+ def __init__(self, jid, password, plugin_config={}, plugin_whitelist=[],
+ escape_quotes=True, sasl_mech=None, lang='en'):
BaseXMPP.__init__(self, jid, 'jabber:client')
self.set_jid(jid)
@@ -69,15 +69,18 @@ class ClientXMPP(BaseXMPP):
self.plugin_config = plugin_config
self.plugin_whitelist = plugin_whitelist
self.default_port = 5222
+ self.default_lang = lang
self.credentials = {}
self.password = password
- self.stream_header = "<stream:stream to='%s' %s %s version='1.0'>" % (
+ self.stream_header = "<stream:stream to='%s' %s %s %s %s>" % (
self.boundjid.host,
"xmlns:stream='%s'" % self.stream_ns,
- "xmlns='%s'" % self.default_ns)
+ "xmlns='%s'" % self.default_ns,
+ "xml:lang='%s'" % self.default_lang,
+ "version='1.0'")
self.stream_footer = "</stream:stream>"
self.features = set()