Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions
Localisation with Flags?
BDC_Patrick last edited by
I've a small Question I couldn't find an answer to..
The Situation is:
When I create Labels/Texts with tr(""), I can create a QT Localisation file.
Within this file, all texts are listed..
so long, so good..
Now, I created around 100 different Dialogs.. each one has two or three Buttons with (opt. Apply), OK and Cancel.
Refreshing the Localisation file.. I now have 100 times "Oak".. 100 times "Cancel".. and over 40 times "Apply"..
so. more work than necessary..
Perhaps.. someone can lead me into the correct Direction..
How can I add a Language Flag.. like..
%confirm%, %cancel% and %apply%
so I only have each entry only one time for all Dialogs project wide, instead of hundreds over hundreds of it..?
Use a custom widget for your Dialog buttons like e.g. QDialogButtonBox.
Or do a search'n'replace in the ts files. Or use QCoreApplication::translate() to translate those strings (only works when you don't use ui files)