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. Translation question
Forum Updated to NodeBB v4.3 + New Features

Translation question

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 343 Views 2 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by Perdrix
    #1

    I have a set of language files including myapp.de_DE.qm

    My code for setting the default language currently does:

    QString language = QLocale::system().name();

    and then uses that to build the fileid for QTranslator.load() of myapp.de_DE.qm for a system running in German in Germany.

    However this doesn't work for an Austrian user whose language name is most likely de_AT.

    I'm thinking of using the other variant of QTranslator::load() that accepts a QLocale() as the first parameter, but would like to know what QLocale::uiLanguages() would return on system running Austrian German. Would it include de_DE?

    Thanks
    David

    1 Reply Last reply
    0
    • PerdrixP Offline
      PerdrixP Offline
      Perdrix
      wrote on last edited by
      #2

      Bump anyone know this stuff?

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

        @Perdrix said in Translation question:

        return on system running Austrian German. Would it include de_DE?

        If so I would call it a bug. If you don't want the region specific art, simply replace or remove it.

        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
        0
        • PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote on last edited by
          #4

          So you are suggesting that I should just have mayapp.de.qm files, and leave off the region?

          I'm quite OK with that - just a matter of understanding what the right thing to do is.
          David

          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