Multi language support for Qml based Qt GUI
-
Hi All,
I am new to Qt, I ve run the arrowpad, hellotr and i18N examples provided with my Qt 5.7 and understood the concept involved in the translations.
Creating a .ts and .qm file and using QtLinguist to update/release the binary's provide the relevant strings and using QTranslator, but when I tried to use the same for a .qml based window it doesn't seems like generating the tag in .ts.
Can somebody explain me the concept which I have to look for translating a text string in .qml based language?
-
Hi All,
I am new to Qt, I ve run the arrowpad, hellotr and i18N examples provided with my Qt 5.7 and understood the concept involved in the translations.
Creating a .ts and .qm file and using QtLinguist to update/release the binary's provide the relevant strings and using QTranslator, but when I tried to use the same for a .qml based window it doesn't seems like generating the tag in .ts.
Can somebody explain me the concept which I have to look for translating a text string in .qml based language?
-
Thanks Julien,
Just now found this, thanks...
Also when I add this .qml in the .pro the files are getting added twice in the project view directory.
as they are already added as
DISTFILES +=
FeatureModel.qml \Should I need to remove the DISTFILES in .pro to exclude the addition twice?
-
Thanks Julien,
Just now found this, thanks...
Also when I add this .qml in the .pro the files are getting added twice in the project view directory.
as they are already added as
DISTFILES +=
FeatureModel.qml \Should I need to remove the DISTFILES in .pro to exclude the addition twice?
I think you must keep
DISTFILESas it intended for another purposelupdatescan throughtSOURCES(andRESSOURCES?) files to extract text to translate. That's why you add.qmlfiles usinglupdate_only.Nevertheless
lupdate_onlyallow qmake to ignore thoses files for compilation but they still appears in QtCreator inside the Sources folder of your project view directory, even if they are not sources files.