Hello
While developing a Qt Application, I ran into a problem in using QTranslator. After a little research, I found out that the problem was with lupdate from Qt having problem with the
using namespace;
directive. Following the instructions found in here, I discovered that I have to use special comments in my code, to help lupdate understand that the classes are inside a namespace. The special comment is something like this:
/*
TRANSLATOR namespace::MyClass
*/
So, I added this comments in all my sources that had QStrings being managed by tr. But, still, the applications is not being translated. The installTranslator method of QTranslator is returning true. The actual code I'm using to install the Translator is
Application app(argc,argv); //Application is a subclass of QApplication
QTextCoded::setCodecForTr(QTextCodec::codecForName("utf8"));
QTranslator translator;
translator.load(QString("..//language//") + locale);
app.installTranslator(&translator);
app.exec();
Have anyone ran into the same problem? What am I doing wrong?
EDIT--
Corrected one little mistake in the code above, but still no results.