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. Mac OS: how to localize the application menu entry?
Forum Update on Monday, May 27th 2025

Mac OS: how to localize the application menu entry?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.9k 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by Violet Giraffe
    #1

    The Mac OS-specific menu that Qt handles internally is not localized in my app, how can I fix this? I assume the translation for those standard items like "Services" or "Hide' is shipped with Qt, but how do I tell it which language I'm currently using?

    I'm talking about this menu:

    alt text

    My application is localized via my own QTranslator subclass. I use my own language files instead of .ts or .qm, so naturally Qt doesn't know which language is currently selected. But I don't see any way to specify it. The language can be switched in the settings so it's not tied to the system locale or anything else.

    P. S. I've read this article and still don't understand how it's supposed to work. Does Qt Linguist simply add its own tokens (like "Services" on the screenshot) to my tokens when generating .ts files? That would be pretty bad.

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

      Hi,

      Are you looking for this ?

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

      V 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Are you looking for this ?

        V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by Violet Giraffe
        #3

        @SGaist
        Hi. Yes, thank you, that seems to be it, but I don't understand anything there. What do I need to do in order to translate this menu entry? Do I need to supply my own translations in the form of .plist or .lproj files?

        Specifically, that article doesn't explain where this locversion.plist file has to be placed. It doesn't mention Norwegian anywhere in its contents, so I assume the language is determined by the folder it is in.

        mrjjM 1 Reply Last reply
        0
        • V Violet Giraffe

          @SGaist
          Hi. Yes, thank you, that seems to be it, but I don't understand anything there. What do I need to do in order to translate this menu entry? Do I need to supply my own translations in the form of .plist or .lproj files?

          Specifically, that article doesn't explain where this locversion.plist file has to be placed. It doesn't mention Norwegian anywhere in its contents, so I assume the language is determined by the folder it is in.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Violet-Giraffe
          From google it seems that it should be placed like
          Resources/English.lproj/locversion.plist
          in the .app folder.
          (english in this example)

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

            .lproj is a folder extension like .app for application bundle.

            You have more information linked to that at the bottom of the Translating the Application Menu and Native Dialogs chapter.

            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