Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]QButtonBox translation

[Solved]QButtonBox translation

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 3.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pmjz
    wrote on last edited by
    #1

    Hi guys,

    I wanna translate ok or cancel in QButtonBox to anyother language, some guys suggest me do something like this:
    @
    buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Ok"));
    buttonBox->button(QDialogButtonBox::Cancel)->setText(tr("Cancel"));
    @
    and then I execute lupdate and generate the .ts file, but, there are not any way to translate those two items when I open .ts file by using linguist, because ok and cancel is noe list in source text pane.

    welcome any ideas. thanks a lot

    [Edit: Be sure and wrap your code in @-tags -- mlong]

    1 Reply Last reply
    0
    • L Offline
      L Offline
      leon.anavi
      wrote on last edited by
      #2

      I have been using translation in a common way without any problems. Read carefully "Qt Linguist manual":http://qt-project.org/doc/qt-4.8/linguist-manager.html and make sure that lupdate has produced a valid ts file that is up to date.

      http://anavi.org/

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tomma
        wrote on last edited by
        #3

        Qt has translations for those:
        http://lists.trolltech.com/qt-interest/2006-11/thread00779-0.html

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pmjz
          wrote on last edited by
          #4

          thanks, I got it. Qt has done some translations under directory QtSDK/QtSource/4.8.1/translations

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved