qt-interest@trolltech.com
[Top] [All Lists]

Re: tr() is not working for me

Subject: Re: tr() is not working for me
From: peter
Date: Thu, 20 Dec 2007 08:34:22 +0100
Hello Dan,
use document for "internationalize" and do not forget to load the translation for qt itself, you'll find it in $QTDIR$/translations (QM + TS - files), if you do not load, all "standard dialogs" like QMessageBox are in english language.

Regards,
Peter

Dan White schrieb:
I am creating applications to create various calendar pages
( Shameless plug: <http://www.diyplanner.com/templates/dynamic/> -- and all the source is there )
I live in the US

I am encountering problems with tr()

Specifically, in the app DIY_Two_Page_Year, I received email from a Netherlander, telling me that things were not translating properly

I am using the QDate::toString() method for all day and month names and that is working, but static text - like buttons and labels and such do not work.

They show up in English.

Example code snippets:

QPushButton *quit = new QPushButton ( tr ( "Quit" ), this ) ;

QString leftLabel = tr("Calendar Year ") ;

But it all shows up in English.
What did I miss ?
Do I need a translation file to get things like "Quit" to translate to the "local" language ?

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>