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:
My application is localized via my own
QTranslatorsubclass. I use my own language files instead of
.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.
Are you looking for this ?
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.plistfile 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.
From google it seems that it should be placed like
in the .app folder.
(english in this example)
.lprojis a folder extension like
.appfor application bundle.
You have more information linked to that at the bottom of the
Translating the Application Menu and Native Dialogschapter.