I recently used this to create translations files in different languages. First of all you will have to add name of files or location of files to the .pro file of your project that you want to generate TS files. After adding that you can run following:-
1. qmake -myproject.pro
2. lupdate myproject.pro This command will produces the .ts translation files listed in the project file.
3. lrelease to create qm files.
HEADERS main-dlg.h \
options-dlg.h
SOURCES main-dlg.cpp \
options-dlg.cpp
FORMS search-dlg.ui
TRANSLATIONS search-dlg_ch.ts \ //Creates a file for chinese
search-dlg_fr.ts \ //French
search-dlg_ru.ts \ //Russian
search-dlg_pl.ts //Polish
HEADERS main-dlg.h \
options-dlg.h
SOURCES main-dlg.cpp \
options-dlg.cpp
FORMS search-dlg.ui
TRANSLATIONS search-dlg_ch.ts \ //Creates a file for chinese
search-dlg_fr.ts \ //French
search-dlg_ru.ts \ //Russian
search-dlg_pl.ts //Polish
To copy to clipboard, switch view to plain text mode
Thanks !!
Bookmarks