I want to add multi-language support to my application that is written in Python using PyQt4. I was looking for information on how to add multiple languages ββand would like to see how other people do it.
Here I read:
PyQt's behavior is unsatisfactory and may change in the future. It is recommended that QCoreApplication.translate () be used in preference from tr () (and trUtf8 ()). This is guaranteed to work with current and future versions of PyQt and greatly facilitate the exchange of message files between Python and C ++ code.
In the files created by pyuic4 , I see something like:
WPopupCalendar.setWindowTitle(QtGui.QApplication.translate("WPopupCalendar", "", None, QtGui.QApplication.UnicodeUTF8))
This is too long for me. I was thinking of creating my own helper function tr , which somehow automates the process.
Also, I could not find articles describing the workflow and features of developing multilingual applications in python with pyqt4.
Could you advise me some good and convenient methods?
source share