[wxPython-users] i18n under Windows?

Werner F. Bruhin werner.bruhin at free.fr
Sun Feb 4 02:02:52 PST 2007


Hi Basil,

Basil Shubin wrote:
> Hi friends,
>
> I have setup i18n routine in my app. On Linux it's works, as it should 
> to work. But on Windows 2000 SP I caught following bug (see screenshot).
>
> Here the code, that raise this bug:
>
>     # set up internatiolization
>     global _wxloc
>     wx.Locale_AddCatalogLookupPathPrefix(locations['locale'])
>     _wxloc = wx.Locale(wx.LANGUAGE_DEFAULT) # Seems error was appear on
>     _wxloc.AddCatalog('bbcalc')         # this two line???
>     import __builtin__
>     setattr(__builtin__, '_', wx.GetTranslation)
>
> locations['locale'] is a 
> os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 
> 'i18n'))
What if you change it to:
wx.Locale.AddCatalogLookupPathPrefix(locations['locale'])

Note the full stop after wx.Locale.

You might want to have a look at the I18n module in the wxPython demo 
(as of 2.8).

Werner




More information about the wxpython-users mailing list