Preparing the GUI for internationalization
In this recipe, we will prepare our GUI for internationalization by realizing that not all is as easy as could be expected when translating English into foreign languages.
We still have one problem to solve and that is how to properly display non-English Unicode characters from foreign languages.
One might expect that displaying the German ä, ö, and ü Unicode umlaut characters would be handled by Python 3 automatically, but this is not the case.
Getting ready
We will continue to use the Python GUI we developed in recent chapters. First, we will change the default language to German in the GUI.py
initialization code.
We do this by uncommenting the line self.i18n = I18N('de')
.
How to do it...
When we change the word Ueber
to the correct German Űber
using the umlaut character, the Eclipse PyDev plugin is not too happy.
We get an error message, which is a little bit confusing, because when we run the same line of code from within the Eclipse PyDev Console,...