gordebak
10th November 2012, 12:30
Hello everyone!
This is my first post on the forums, so if I posted it in the wrong place, sorry. Moderators feel free to move it where it belongs.
I have a small Qt app, and it has a localization for Czech. But I can't seem to get it to work. Till now I tried the following
I put these lines in my app.pro file:
TRANSLATIONS += cs_CZ.ts \
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
updateqm.input = TRANSLATIONS
updateqm.output = qm/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm qm/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
INSTALLS += translations
translations.path = /usr/share/app
translations.files = qm/cs_CZ.qm
It compiles the translation and installs fine. But when I run the app translation doesn't work. Any ideas?
This is my first post on the forums, so if I posted it in the wrong place, sorry. Moderators feel free to move it where it belongs.
I have a small Qt app, and it has a localization for Czech. But I can't seem to get it to work. Till now I tried the following
I put these lines in my app.pro file:
TRANSLATIONS += cs_CZ.ts \
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
updateqm.input = TRANSLATIONS
updateqm.output = qm/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm qm/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
INSTALLS += translations
translations.path = /usr/share/app
translations.files = qm/cs_CZ.qm
It compiles the translation and installs fine. But when I run the app translation doesn't work. Any ideas?