From 47f2df6d21237b0abfbfe5757683c0b8e3a32e47 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Feb 2007 23:42:57 +0000 Subject: [PATCH] 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 --- wxPython/demo/I18N.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wxPython/demo/I18N.py b/wxPython/demo/I18N.py index c04c5506e8..e35f483a9b 100644 --- a/wxPython/demo/I18N.py +++ b/wxPython/demo/I18N.py @@ -177,7 +177,10 @@ class LanguageSelectPanel(wx.Panel): # create a locale object for this language self.locale = wx.Locale(lang) - self.locale.AddCatalog('wxpydemo') + if self.locale.IsOk(): + self.locale.AddCatalog('wxpydemo') + else: + self.locale = None def translateExample(self): self.translatedST.SetLabel(_(self.englishBaseCh.GetStringSelection()))