Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt language files for Chinese
Dear Qt Developers,
I am trying to internationalize my application. I did some research; there are some qt files already translated.
They are used in QMessageboxes, QDialogs etc.
I can successfully load the qtbase_<LANGUAGE>.qm files into my application. I tried a few languages, and the buttons like: "Ok, Cancel, Help, Apply" are correctly translated into the right language.
Now I am trying to load the Chinese language, but there are no qtbase_<>.qm files available for Chinese.
But I found the ''qt_zh_CN.qm'' and ''qt_zh_TW.qm'' files. So I thought that would be enough for the 'OK, Cancel and Help' buttons to be translated. The file itself is successfully loaded btw.
Unfortunately that's not working and I don't understand why. Do I have to translate another qtbase file into Chinese to get it working? Or are there already Chinese language files that will work?
I am using Qt 5.9.1.
Would be nice to get some help with this!
Might be a silly question but do you have a font that can display Chinese characters ?
I use the default font on Windows 10 that Qt uses. So I guess that needs to be possible right?
I tried to set the global application font to a chinese font from microsoft like this:
QFont font("Microsoft JhengHei"); QApplication::setFont(font);
At the beginning of the application, but that didn't help.
Can you try to load the chinese translation in Qt? They released the chinese translation for Qt so I guess it needs to work right? You're not releasing something that doesn't work...
I may have misunderstood something. What part of your application is not translated ? Nothing at all ?
Nothing at all is translated. All the Qt buttons for example are still in English.
It's different for German for example, then the Qt Buttons are translated into the correct language.
I use the qtbase_de.qm file for German.
Please provide a minimal sample program that reproduce that behaviour.
koeniee last edited by koeniee
Thanks for you answer, and sorry for my late reply.
I added an example project. Hope you can see my problem.
You can download the project here, I wasn't able to upload the project on this site, so here is an alternative:
I really need a solution for this... anyone..?
I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.