Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved]QButtonBox translation

    General and Desktop
    3
    4
    3168
    Loading More Posts
    • 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
      pmjz last edited by

      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 Reply Quote 0
      • L
        leon.anavi last edited by

        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 Reply Quote 0
        • T
          tomma last edited by

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

          1 Reply Last reply Reply Quote 0
          • P
            pmjz last edited by

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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post