can not translate standardButtons - is this expected?
My preference is obviously to use standard components where possible, and currently use MessageDialog with standardButtons wherever possible - but the standard buttons are always English - is this expected?
I have translation files for over 20 languages and all my custom strings appear translated as expected, but 'Yes', 'No' and 'Show Details' are always English. I see that 'Yes', 'No' and 'Show Details' do not appear in my .ts files for translation - how can I make them appear?
Can you put the qsTr() around StandardButton.Yes ? (that just doesn't look right!)
GrahamL last edited by
You should be able to find the translations for Qt in a folder called translations in your Qt installation.
Thank you for this clue.
So now I see a number of sets of qm files in the translation folder. Is there a way that I can tell which set the standard buttons are contained within? (eg: in qt_lang.qm, or qtbase_lang.qm). As the standardButtons are a part of QtQuick.Dialogs, I would have thought there would be a set of qm files called qtquickdialogs_lang.qm - but there aren't.
As these .qm's must ultimately be generated from .ts files, I went looking online and found this
here I see corresponding .ts files - but searching here doesn't help me get closer to the elusive standardButtons. Am I on the right track?
William Gorden last edited by William Gorden
Hi, I'm having the same problem!
I'm developing a german language version of my app.
However, the yes and no buttons appear correctly when I run my App on OSX:
yes = "ja" and no = "nein"
But on Android they appear in english!!
I checked my Android tablets (Samsung Galaxy tab4 and Asus Transformer) and they are both set to german in their language settings!
Does anybody know why this is behaving differently on each OS??
This is still an issue for me. I did go down the track of translating the qt_base.ts files for all the languages, but these appear to only work for QWidget components not QML (ie: these files worked in our installer, but not in our application).
So to boil down my question - in which file are standardButtons translated for use in QML?
KoneTaH last edited by