- Add translation file to myapp.pro file.
e.g. TRANSLATION = app_de.ts - Run lupdate on the .pro file (in cmd prompt/console) to generate translation sources in XML-based format. lupdate will generate the .ts file for you.
e.g. lupdate myapp.pro - Run Linquist to load the .ts file.
Put translation strings of your choices there, and then Ctrl+Enter to accept each string. - Generate the binary translation file (.qm), so that you can load it at run time.
lrelease myapp.pro - In your code, create a QTranslator object, QTranslator.load(your .qm file), and then QApplication.installTranslator(your QTranslator object)
Search This Blog
Monday, June 22, 2009
Qt Internationalization
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment