PDA

View Full Version : Translating to spanish using Qt Linguist



tennisace
9th April 2012, 00:29
Can someone please help me translate a portion of my program into spanish (using what i thought was qt linguist)?

I have a project with mutliple files but was just going to translate the helpdialog into spanish. I want the user to be able to view the help in english however if they go to the toolbar and click language->spanish then spanish should be loaded next time the helpdialog is opened. I have assigned "tr" to all the contents that needs to be translated. and added the "TRANSLATIONS = helpdialog_sp.ts" to the pro file.

Also in main.cpp I added the following code:
QString locale = QLocale::system().name();

QTranslator translator;
translator.load(QString("helpdialog_") + locale);
a.installTranslator(&translator);

When i compiled the program after running the lupdate and lrelease commands the output was generated 0 translations & ignored 88 untranslated source text

Any guidance/help/tips you can give me on this issue would help me so much