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?
When writing on your Mac, you can replace what you have written with a translation. Select the text you want to replace with a translation. Control-click the selected text, then choose Translate. Click Replace with Translation to insert the translation and replace the original text.
Qt Linguist is a tool for adding translations to Qt applications. Run Qt Linguist from the taskbar menu, or by double clicking the desktop icon, or by entering the command linguist at the command line. Once Qt Linguist has started, choose File|Open from the menu bar and select a translation source (TS file) to load.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With