I had some kind of patch for this, but I never got it working sensibly on S3_0. Later branches seemed easier, thanks to some Qt-client code refactoring done.
Reply To cazfi
I had some kind of patch for this, but I never got it working sensibly on S3_0. Later branches seemed easier, thanks to some Qt-client code refactoring done.
Dropping S3_0 target for that reason.
Just saying, one can install a custom QTranslator on the QCoreApplication. Ki18n has a gettext-based implementation.
What a terrible patch. With this approach you will need to implement custom translations for keyboard shortcuts, the file dialog, "about Qt", ... Qt already ships translations for all of this, just initialize the Qt locale correctly. Strings for many languages are shipped by default, at /usr/share/qt*/translations/ on Debian-like systems. If you insist on having full control, install your own QTranslator in the QApplication.
Reply To (Anonymous)
on Debian-like systems.
That's likely the easiest environment to get things working. Not so sure about some Windows setups we have, among others.
Windows setups
A few seconds of googling gave the following:
MinGW: mingw-w64-x86_64-qt6-translations
Cygwin: qt5-translations
On Windows I think they can simply be copied next to the executable. Files can also be loaded explicitly using the QTranslator API.
We have no translations for Qt's default buttons. Qt would want to handle them by its own mechanisms, not through our gettext.
Simplest solution would be not to use those Qt's buttons, but implement equivalents ourselves.