Hi all,
I’m having a peculiar issue with attempting to load a zh_CH (Chinese - Simplified) locale with wx’s built in functionality. Please see the attachment on this Group post for the sample application (doesn’t seem to be an attachment feature on these forums): https://groups.google.com/forum/#!topic/wxpython-users/ypfRxfbksXs
Run wxLocale.py. It’s a slimmed down version of Sample 3 from https://wiki.wxpython.org/Internationalization%20-%20i18n%20(Phoenix) When it loads, you’ll see the header text show “Sample Title Text English”. Select French in the drop down and restart the application. Now the title says “Sample Title Text French” as expected. Then select Deutsche - same thing.
When Chinese is selected, the title spits out the English title. I’ve tracked down a possible reason here on line 164:
self.locale.AddCatalog(langDomain)
That function returns false. According to the documentation, this “might mean that the catalog is not found or that it isn’t in the correct format”, but it doesn’t go into any more detail.
That being said, if you run getTextLocale.py (which usees the gettext module directly), you’ll see it printing out the expected Chinese translation: “Sample Title Text Chinese - Simplified”, so the file itself seems to be proper.
Any ideas on what to try next for troubleshooting?
Python 3.6
wxPython 4.0.0b2 (I’ve tried with 4.1 as well, same issue)