示例#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
def initialize():
	logging.info("Initializing the i18n subsystem.")
	core.set_active_language(versionInfo.name, locations.catalogFilesLocation(), config.conf['general']['language'])
示例#4
0
def getAvailableLanguages():
	return core.available_languages(locations.catalogFilesLocation(), versionInfo.name)
示例#5
0
def getAvailableLanguages():
    return core.available_languages(locations.catalogFilesLocation(),
                                    versionInfo.name)
示例#6
0
def initialize():
    logging.info("Initializing the i18n subsystem.")
    core.set_active_language(versionInfo.name,
                             locations.catalogFilesLocation(),
                             config.conf['general']['language'])