'Change the UI language setting.
.. note:: This method is the slot responses to the signal argument
:attr:`lang` from SelectLang widget while the value is changed.
:param lang: The language name which is selected by user.
.. note:: This string is typically in the format of IETF language
tag. For example: en_US, en_GB, etc.
.. seealso:: :attr:`language` in :class:`~gui.language.LangUtil`
class.
:type lang: str'

def on_Lang_changed(self, lang):

    new_lang = LangUtil.get_locale_by_language(unicode(lang))
    trans = QtCore.QTranslator()
    from hostsutil import LANG_DIR
    trans.load((LANG_DIR + new_lang))
    self.app.removeTranslator(self._trans)
    self.app.installTranslator(trans)
    self._trans = trans
    self.ui.retranslateUi(self)
    self.init_main()
    self.check_connection()
