Important: Please read the Qt Code of Conduct -

Mac OS: how to localize the application menu entry?

  • 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.

  • Lifetime Qt Champion


    Are you looking for this ?

  • @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.

  • Lifetime Qt Champion

    From google it seems that it should be placed like
    in the .app folder.
    (english in this example)

  • Lifetime Qt Champion

    .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.

Log in to reply