示例#1
0
	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
示例#2
0
 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
示例#3
0
文件: i18n.py 项目: FBSLikan/TheQube
def setup():
 logging.info("Initializing the i18n subsystem.")
 core.set_active_language(application.name, paths.locale_path(), config.main['languages']['current'])
示例#4
0
def initialize():
	logging.info("Initializing the i18n subsystem.")
	core.set_active_language(versionInfo.name, locations.catalogFilesLocation(), config.conf['general']['language'])
示例#5
0
def setup():
    logging.info("Initializing the i18n subsystem.")
    core.set_active_language(application.name, paths.locale_path(),
                             config.main['languages']['current'])
示例#6
0
文件: i18n.py 项目: mush42/Bright
def setup():
 logging.info("Initializing the i18n subsystem.")
 core.set_active_language(application.name, paths.locale_path(), config.conf['general']['language'])
示例#7
0
def initialize():
    logging.info("Initializing the i18n subsystem.")
    core.set_active_language(versionInfo.name,
                             locations.catalogFilesLocation(),
                             config.conf['general']['language'])