ensure that a bad locale is destroyed before it is attempted to be used

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@44432 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2007-02-09 23:42:57 +00:00
parent 0408709133
commit 47f2df6d21

View File

@@ -177,7 +177,10 @@ class LanguageSelectPanel(wx.Panel):
# create a locale object for this language # create a locale object for this language
self.locale = wx.Locale(lang) self.locale = wx.Locale(lang)
if self.locale.IsOk():
self.locale.AddCatalog('wxpydemo') self.locale.AddCatalog('wxpydemo')
else:
self.locale = None
def translateExample(self): def translateExample(self):
self.translatedST.SetLabel(_(self.englishBaseCh.GetStringSelection())) self.translatedST.SetLabel(_(self.englishBaseCh.GetStringSelection()))