diff --git a/src/common/xmpp/dispatcher_nb.py b/src/common/xmpp/dispatcher_nb.py index 9b3cf342c..d2ae71dfc 100644 --- a/src/common/xmpp/dispatcher_nb.py +++ b/src/common/xmpp/dispatcher_nb.py @@ -23,7 +23,7 @@ Contains one tunable attribute: DefaultTimeout (25 seconds by default). It defin Dispatcher.SendAndWaitForResponce method will wait for reply stanza before giving up. ''' -import simplexml, sys +import simplexml, sys, locale from xml.parsers.expat import ExpatError from protocol import * from client import PlugIn @@ -111,6 +111,9 @@ class Dispatcher(PlugIn): self._metastream.setAttr('version', '1.0') self._metastream.setAttr('xmlns:stream', NS_STREAMS) self._metastream.setAttr('to', self._owner.Server) + if locale.getdefaultlocale()[0]: + self._metastream.setAttr('xml:lang', + locale.getdefaultlocale()[0].split('_')[0]) self._owner.send("%s>" % str(self._metastream)[:-2]) def _check_stream_start(self, ns, tag, attrs):