Internationalization with Qt VS Tools
My first post here. I'm quite new to Qt.
I'm planning to develop a multi-platform application using Qt and I'm planning to support two languages. I'm not using QtCreator. So far I'm quite happy with Qt VS Tools, so I would like to stay there if possible.
My question is: how well is the whole Internationalization process supported under Qt VS Tools? Will I encounter difficulties because of not having a Qt Creator project?
I'm still reading the documentation about Internationalization, so I'm still not quite familiar with the process.
Thank you very much for any insight.
Does that mean that I will be forced to have a .pro file in order to use translation files?
Pablo J. Rogina
@wasawi I'm not familiar with Qt VS Tools since I always use Qt Creator, but I'm familiar with the internationalization process/flow in Qt so I'll describe it briefly as you mentioned you're new to Qt.
- Wrap all your "translatable" strings with tr() method
QLabel *lbl = new QLabel(tr("Address:");
- Run lupdate program to create .ts (XML files) for all the languages set in your .pro project file
TRANSLATIONS = myapp_es.ts \ myapp_fr.ts
- Run linguist and open the .ts files, and provide the appropriate translation for every string. Repeat for all your language files.
- Run lrelease program to convert your translated .ts files into compiled .qm files
- Distribute (or embedded into executable, by means of resource file .qrc) your .qm files
Most of those steps are carried on from Qt Creator itself. You can read more about the translation tools in Qt here.
But it turned out that reading Qt VS Tools documentation, you'll have quite the same approach from within Visual Studio itself.
Please let us know it it works properly. Happy translations!
Hi... languages support is optimal the best... at this time i work by one "Recognition of language" support inside qt5 ...
one simple header file can sniff the language from text user in 2millisecond ...sample at:
https://github.com/pehohlva/DocSpeacker/blob/master/3rdparty/cld/datamodelqchar.h + language list 120 or more
I think the translation files will be over in the coming years or month...
voice (25 language support) and text (120 language support) having a perfect quality by correct setting and automation from developer...
Thank you for your help.
I have successfully created an application which can be translated at runtime with both QtCreator and Visual Studio.
It toke me a while to understand that environment variables are not always immediately updated depending on where you run your application from, sometimes you need to restart your cmd or ConEmu.
Some helpful links:
Translation process overview:
Internationalization with Qt
Dynamic (runtime) translation
Pablo J. Rogina
@wasawi Glad you have solved your issue, and that you have replied with a good summary of applicable links, not a lot of people does that once their problem is gone.
Please don't forget to mark the post as solved. Thanks.