QSerialPort Language
-
Hello,
I am using QSerialPort and trying to set the language to a specific language, but still not able to do it.
I would like the errorString() to be output in a specific language so I was thinking to set the Locale, but seems there's no setLocale method.How can I solve this problem?
Thanks for your help
-
Hello,
I am using QSerialPort and trying to set the language to a specific language, but still not able to do it.
I would like the errorString() to be output in a specific language so I was thinking to set the Locale, but seems there's no setLocale method.How can I solve this problem?
Thanks for your help
@Gaetano03
I don't imagineQSerialPort
has any reason to have its own language.QLocale::setDefault(QLocale("..."))
sets the overall language.- If that has no effect, either there is no language translation for the error message or it comes from the OS, e.g. Windows.
-
If that has no effect, either there is no language translation for the error message or it comes from the OS, e.g. Windows.
I guess the problem is the OS then, since I want the errorstring to be printed in English, but I have it in Italian.
Should I try and change the system locale?
-
You have to load the QSerialPort translation for your desired language as you do for QtBase - the qm file is in the same location (<QTDIR>/translations)