Qt 5.5 tr usage
in .cpp file, wherever you want, wrap QString with a tr("somesz") rendering it ready to be translated.
in .pro file, specify the readable translation file:
1 //*.pro 2 TRANSLATIONS += *tr_chn.ts 3 TRANSLATIONS += *tr_la.ts 4 ...
in the project location, call the lupdate.exe in the the desired version folder's bin:
1 lupdate *.pro
generated *tr_*.ts file, open them as .txt file, modify the XML formatted file:
1 <!--from:--> 2 <translation type="Unfinished"></translation> 3 <!--to:--> 4 <translation>Translated Chars</translation>
in the project location, call the lrelease.exe in the desired version folder's bin as:
1 lrelease.exe *tr_*.ts
copy the generated *tr_*.qm file to the release folder with the main application and done.
Anyone is permitted to copy/use the contents and codes from this blog.
Sansna is not going to guarantee anything, Sansna will not take any responsibility of any results after using these codes/contents.