E. A. Tacao wrote:
Check if you have a .../site-packages/wx/locale/... directory. If you
don't, download this:Download wxPy-missing-win32-locale-files.zip (wxPython)
and unzip in the ../site-packages/wx directory. There's more info
about it here:http://lists.wxwidgets.org/cgi-bin/ezmlm-cgi?11:mss:28999:200405:kciblebjodekafeiclmn
I have not site-packages/wx/locale/, wxstd.mo files are at
/usr/local/share/locale/XX/LC_MESSAGES dirs.
ls -1b -R ./locale
locale:
ru
uk
locale/ru:
LC_MESSAGES
locale/ru/LC_MESSAGES:
pbook.mo
locale/uk:
LC_MESSAGES
locale/uk/LC_MESSAGES:
pbook.mo
>>> import wx
>>> i18n = wx.Locale()
>>> i18n.AddCatalogLookupPathPrefix("./locale")
>>> i18n.AddCatalog("pbook")
False
I try to pass AddCatalogLookupPathPrefix full path, but it does not work to!
than I cp locale/ru/LC_MESSAGES/pbook.mo .
>>> i18n.AddCatalog("pbook")
True
I think that i18n.AddCatalogLookupPathPrefix("./locale") does not work correctly! may be bug?
When I copy pbook.mo to program root dir, i18n.AddCatalog("pbook") return True but it does not want to translate
P.S.
after gettext.install and _ = gettext.gettext it translate strings, but only at *.py! I need to translate strings from XRC files to, that is why I use wx.Locale + _ = wx.GetTranslation
···
--
WBR, sector119