def changeLanguage(self): newLanguage=i18n.langFromLangDisplayName(self.GeneralPage.languageChoice.GetValue()) if newLanguage!=self.GeneralPage.oldLanguage: try: core.set_active_language(versionInfo.name, locations.catalogFilesLocation(), newLanguage) self.needsRestart=True except: logging.error("Language setting error.") wx.MessageDialog(self,_("Error in %s language file")%newLanguage,_("Language Error"),wx.OK|wx.ICON_WARNING).ShowModal() self.needsRestart=False return config.conf["general"]["language"]=newLanguage
def changeLanguage(self): newLanguage = i18n.langFromLangDisplayName( self.GeneralPage.languageChoice.GetValue()) if newLanguage != self.GeneralPage.oldLanguage: try: core.set_active_language(versionInfo.name, locations.catalogFilesLocation(), newLanguage) self.needsRestart = True except: logging.error("Language setting error.") wx.MessageDialog(self, _("Error in %s language file") % newLanguage, _("Language Error"), wx.OK | wx.ICON_WARNING).ShowModal() self.needsRestart = False return config.conf["general"]["language"] = newLanguage
def setup(): logging.info("Initializing the i18n subsystem.") core.set_active_language(application.name, paths.locale_path(), config.main['languages']['current'])
def initialize(): logging.info("Initializing the i18n subsystem.") core.set_active_language(versionInfo.name, locations.catalogFilesLocation(), config.conf['general']['language'])
def setup(): logging.info("Initializing the i18n subsystem.") core.set_active_language(application.name, paths.locale_path(), config.conf['general']['language'])