[Solved] Application menu translation on Mac
-
wrote on 16 Oct 2012, 05:49 last edited by
I follow this instruction: http://qt-project.org/doc/qt-4.8/mac-differences.html#translating-the-application-menu-and-native-dialogs
I have created *.lproj -folders and put locversion.plist. Also I have changed content of locversion.plist such as described in the documentation. But I can't get this working. Application menu is always in English even language of Mac OS X is different.
Here is the bundle structure:
@
MyApp.app/Contents/
Resources/
en.lproj/
locversion.plist
fi.lproj/
locversion.plist
sv.lproj/
locversion.plist
@(I have Qt 4.8.3 and Mac OS X 10.8)
Any ideas?
Thanks.
-
wrote on 22 Oct 2012, 08:23 last edited by
I found the solution. I add the following parts to my ts-file:
@<context>
<name>MAC_APPLICATION_MENU</name>
<message>
<source>Services</source>
<translation>Services</translation>
</message>
<message>
<source>Hide %1</source>
<translation>Hide %1</translation>
</message>
<message>
<source>Hide Others</source>
<translation>Hide Others</translation>
</message>
<message>
<source>Show All</source>
<translation>Show All</translation>
</message>
<message>
<source>Preferences...</source>
<translation>Preferences...</translation>
</message>
<message>
<source>Quit %1</source>
<translation>Quit %1</translation>
</message>
<message>
<source>About %1</source>
<translation>About: %1</translation>
</message>
</context>@Now I can translate application menu in the same way as the other parts.
-
wrote on 9 Jul 2014, 20:09 last edited by
I think that context is already defined in SOME of the qt_xx.qm files. So it depends on the language, and the extent to which the community has provided translations into the qt_xx.ts files for the language?
-
wrote on 5 Oct 2015, 18:38 last edited by
Excuse me. Could I ask a basic question?
How to create *.lproj -folders and put locversion.plist in to my application bundle?
I am very confused. Should I use "add_custom_target(locversion.plist...)" or anything else?Thanks.
-
wrote on 12 Jul 2017, 01:45 last edited by
I find this workground is not fixed to my mac app on Qt5.8? anybody know ?
thanks