Results 1 to 5 of 5

Thread: qmake and localization

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2010
    Posts
    3
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qmake and localization

    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:

    Qt Code:
    1. TRANSLATIONS += cs_CZ.ts \
    2.  
    3. isEmpty(QMAKE_LRELEASE) {
    4. win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
    5. else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
    6. unix {
    7. !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt4 }
    8. } else {
    9. !exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
    10. }
    11. }
    12.  
    13. updateqm.input = TRANSLATIONS
    14. updateqm.output = qm/${QMAKE_FILE_BASE}.qm
    15. updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm qm/${QMAKE_FILE_BASE}.qm
    16. updateqm.CONFIG += no_link target_predeps
    17. QMAKE_EXTRA_COMPILERS += updateqm
    18.  
    19. INSTALLS += translations
    20.  
    21. translations.path = /usr/share/app
    22. translations.files = qm/cs_CZ.qm
    To copy to clipboard, switch view to plain text mode 

    It compiles the translation and installs fine. But when I run the app translation doesn't work. Any ideas?
    Last edited by gordebak; 10th November 2012 at 12:34. Reason: updated contents

Similar Threads

  1. Localization - shortDayName - Raspberry Pi
    By scls19fr in forum Qt Programming
    Replies: 0
    Last Post: 25th October 2012, 17:18
  2. Localization of library
    By realdarkman71 in forum Newbie
    Replies: 0
    Last Post: 27th May 2012, 19:09
  3. Replies: 2
    Last Post: 23rd May 2011, 09:21
  4. Localization for dynamically generated text.
    By vaibhav in forum Qt Programming
    Replies: 10
    Last Post: 14th March 2011, 11:03
  5. Real Time Localization System
    By oswalidos in forum General Programming
    Replies: 3
    Last Post: 22nd September 2009, 19:50

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.