开发者

How can I translate the application menu of a Qt Application on Mac?

I'm trying to port a Qt application from Linux to Mac Os X, and I have a problem to localize the application menu (menu which contains Preferences, Quit, ...).

I followed instructions from http://doc.qt.io/archives/qt-4.7/mac-differences.html (Translating the Application Menu and Native Dialogs开发者_高级运维) - I've created a locversion.plist and changed the value of LProjLocal from 'no' to 'fr' - I've copied this file into the folder Resources/fr.lproj of my bundle - I run my application but the application menu is still in English.

Did I miss something? How can I solve this problem?


I found the solution to my problem:

When I ported from Linux, I kept the translations files of qt (qt_xx.qm). However, strings of the application menu aren't translated in this file. I've just replaced this file by the qt_xx.qm of the Qt Sdk for Mac and ... it works.

Some precisions: on Snow Leopard, with Qt 4.7.0, only a folder named xx.lproj is needed to translate the application menu and the dialogs qt.

Sorry for bothering you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜