Qt linguist problem
-
hi
I am trying to convert text from one language to other using qtLinguiststeps I followed :
1)navigated to c:\QT\QT5.9.0\mingw53_32\bin
2)qtenv2.bat
3)lupdate
4)lupdate <path to my project directory>main.qml -ts India_KN.ts
5)got .ts file like this<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="kn_IN"> <context> <name>main</name> <message> <location filename="../../../PROGRAMS/luin/main.qml" line="8"/> <source>Hello World</source> <translation type="unfinished"></translation> </message> </context> </TS>
My first problem is
here <translation type="unfinished"></translation> is blank.....
I placed this .ks file in my project directory
then i opened Qt Linguist and opened .ks to get this
My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?
-
@ashajg said in Qt linguist problem:
My first Question is how can I convert hello world in qt linguist ? in my .ks file translation field is blank so how can I solve that problem?
Qt Linguist is a tool to help translators translate. It won't automatically provide the translation. You need to do that yourself, or hire somebody who knows the language you want to translate to.
The process is simple:
- generate .ts files (BTW. run
lupdate
on your .pro file, not the QML files) - open files in Linguist, fill in the translations
- save the file, and release it (it will produce a qm file)
- load the .qm file using QTranslator as soon as possible
More info: https://doc.qt.io/qt-5/linguist-manager.html
- generate .ts files (BTW. run
-
Under the "Translation to" you have typed "hell world" or copy appropriate text copied google translator(testing purpose only). Click Save button. Also click on the "?" so that you get "right tick" mark. If right tick mark, then that sentence is translated. Next you need to follow what is @sierdzio suggested.
-
@dheerendra thank you sir 😊