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. QSerialPort Language
Qt 6.11 is out! See what's new in the release blog

QSerialPort Language

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 368 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.
  • G Offline
    G Offline
    Gaetano03
    wrote on last edited by
    #1

    Hello,

    I am using QSerialPort and trying to set the language to a specific language, but still not able to do it.
    I would like the errorString() to be output in a specific language so I was thinking to set the Locale, but seems there's no setLocale method.

    How can I solve this problem?

    Thanks for your help

    JonBJ 1 Reply Last reply
    0
    • G Gaetano03

      Hello,

      I am using QSerialPort and trying to set the language to a specific language, but still not able to do it.
      I would like the errorString() to be output in a specific language so I was thinking to set the Locale, but seems there's no setLocale method.

      How can I solve this problem?

      Thanks for your help

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Gaetano03
      I don't imagine QSerialPort has any reason to have its own language.

      • QLocale::setDefault(QLocale("...")) sets the overall language.
      • If that has no effect, either there is no language translation for the error message or it comes from the OS, e.g. Windows.
      1 Reply Last reply
      0
      • G Offline
        G Offline
        Gaetano03
        wrote on last edited by
        #3
        If that has no effect, either there is no language translation for the error message or it comes from the OS, e.g. Windows.
        

        I guess the problem is the OS then, since I want the errorstring to be printed in English, but I have it in Italian.

        Should I try and change the system locale?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You have to load the QSerialPort translation for your desired language as you do for QtBase - the qm file is in the same location (<QTDIR>/translations)

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          3

          • Login

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