ConfigPath = os.path.join(AppliPath, 'configuration')
DictConfigPath = {
'global': os.path.join(ConfigPath, 'global.cfg'),
+ 'preferences': os.path.join(ConfigPath, 'iramuteq.cfg'),
}
return DictConfigPath
DictConfigPath = ConstructGlobalPath(AppliPath)
ConfigGlob = ConfigParser()
ConfigGlob.read(DictConfigPath['global'])
+DefaultConf = ConfigParser()
+DefaultConf.read(DictConfigPath['preferences'])
#repertoire de l'utilisateur
if os.getenv('HOME') != None:
user_home = os.getenv('HOME')
self.preslangue = {}
for langue in code_langues :
self.preslangue[langue] = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=[code_langues[langue]])
-
+ self.setlangue()
#self.presLan_fr = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['fr_FR'])
#self.presLan_en = gettext.translation("iramuteq", os.path.join(AppliPath,'locale'), languages=['en'])
- self.setlangue()
# tell FrameManager to manage this frame
#self._mgr = wx.aui.AuiManager()
self._mgr = aui.AuiManager()
def setlangue(self) :
self.pref.read(self.ConfigPath['preferences'])
- guilangue = self.pref.get('iramuteq', 'guilanguage')
+ try :
+ guilangue = self.pref.get('iramuteq', 'guilanguage')
+ except :
+ guilangue = DefaultConf.get('iramuteq', 'guilanguage')
self.preslangue.get(guilangue, 'english').install()
def OnVerif(self, evt) :