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. Qt language files for Chinese
Qt 6.11 is out! See what's new in the release blog

Qt language files for Chinese

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 6.0k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    koeniee
    wrote on last edited by
    #1

    Dear Qt Developers,

    I am trying to internationalize my application. I did some research; there are some qt files already translated.
    They are used in QMessageboxes, QDialogs etc.

    I can successfully load the qtbase_<LANGUAGE>.qm files into my application. I tried a few languages, and the buttons like: "Ok, Cancel, Help, Apply" are correctly translated into the right language.

    Now I am trying to load the Chinese language, but there are no qtbase_<>.qm files available for Chinese.
    But I found the ''qt_zh_CN.qm'' and ''qt_zh_TW.qm'' files. So I thought that would be enough for the 'OK, Cancel and Help' buttons to be translated. The file itself is successfully loaded btw.

    Unfortunately that's not working and I don't understand why. Do I have to translate another qtbase file into Chinese to get it working? Or are there already Chinese language files that will work?

    I am using Qt 5.9.1.

    Would be nice to get some help with this!

    Kind Regards,

    Koen

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Might be a silly question but do you have a font that can display Chinese characters ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koeniee
        wrote on last edited by
        #3

        I use the default font on Windows 10 that Qt uses. So I guess that needs to be possible right?

        I tried to set the global application font to a chinese font from microsoft like this:

        	QFont font("Microsoft JhengHei");
        	QApplication::setFont(font);
        

        At the beginning of the application, but that didn't help.

        Can you try to load the chinese translation in Qt? They released the chinese translation for Qt so I guess it needs to work right? You're not releasing something that doesn't work...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I may have misunderstood something. What part of your application is not translated ? Nothing at all ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koeniee
            wrote on last edited by
            #5

            Nothing at all is translated. All the Qt buttons for example are still in English.

            It's different for German for example, then the Qt Buttons are translated into the correct language.

            I use the qtbase_de.qm file for German.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Please provide a minimal sample program that reproduce that behaviour.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koeniee
                wrote on last edited by koeniee
                #7

                Thanks for you answer, and sorry for my late reply.

                I added an example project. Hope you can see my problem.

                You can download the project here, I wasn't able to upload the project on this site, so here is an alternative:

                https://www.dropbox.com/s/n3zelivvxriw6no/ChineseLangueTest.zip?dl=0

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  koeniee
                  wrote on last edited by
                  #8

                  I really need a solution for this... anyone..?

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    I'd recommend bringing this to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    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