Results 1 to 2 of 2

Thread: Qt Linguist Question

  1. #1
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Qt Linguist Question

    Hi everybody, I have 4 questions regarding Qt translation issues..

    1. Are tr() calls must(should) be done for manually added widgets(I mean widgets added from the source code, not from the designer)?

    Because I experinced that adding widget from the designer and setting it's locale is adaquate for mark it as a translation candidate for translator.

    Note: Obviously assume that a translator is loaded to our app.

    2. Does "Locale" parameter in the designer for the widgets has anything to do with this issue?

    3. Should tr() calls made for manually added widgets(I mean widgets added from source, nor designer)

    4. How retranslateUi() decides which language is to be translated just with changeEvent()?

    Thanks from now.
    Last edited by zgulser; 23rd March 2012 at 08:52.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt Linguist Question

    1. Every string that you want to be translated should be wrapped in tr().
    2. The 'locale' (set using QWidget::setLocale()) changes widget locale. For example you can have whole app in English, but single text edit line in Chinese.
    3. See #1.
    4. retranslateUI() translates all strings to current application locale language using installed translators.

Similar Threads

  1. how to open qt linguist?
    By tomkonikkara in forum Newbie
    Replies: 1
    Last Post: 29th July 2011, 06:01
  2. Qt Linguist
    By goli in forum Newbie
    Replies: 0
    Last Post: 9th June 2011, 07:52
  3. QT linguist Cmake
    By _Jack_ in forum Qt Programming
    Replies: 1
    Last Post: 18th September 2010, 11:29
  4. Translations Using Linguist
    By QbelcorT in forum Qt Tools
    Replies: 0
    Last Post: 26th March 2009, 15:23
  5. How to use Qt Linguist
    By mourad in forum Qt Tools
    Replies: 1
    Last Post: 24th May 2008, 02:18

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.