[wxPython-users] check proper loading of wx.language

ianaré sévi ianare at gmail.com
Mon Apr 9 18:24:23 PDT 2007


That did it, thank you.

2007/4/5, Robin Dunn <robin at alldunn.com>:
> Make sure that you create the app object before trying to create the
> Locale objects.  Also, because of the way that the C++ locale objects
> work and how that interacts with Python's garbage collection, you'll
> want to destroy the first locale object before assigning the new one to
> the same variable, something like this:
>
> mylocale = wx.Locale(wx.LANGUAGE_WHATEVER, wx.LOCALE_LOAD_DEFAULT)
> if not wx.Locale.IsOk(mylocale):
>     del myLocale
>     mylocale = wx.Locale(wx.LANGUAGE_DEFAULT, wx.LOCALE_LOAD_DEFAULT)
>
>
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org  Java give you jitters?  Relax with wxPython!

-- 
- ianaré sévi


More information about the wxpython-users mailing list