summaryrefslogtreecommitdiffstats
path: root/tools/linguist/tutorial/tt3/main.cpp
blob: e5abaf6988b9a9e133bace9c3cb3b8c0350ebdc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/****************************************************************
**
** Translation tutorial 3
**
****************************************************************/

#include "mainwindow.h"

#include <qapplication.h>
#include <qstring.h>
#include <qtextcodec.h>
#include <qtranslator.h>

int main( int argc, char **argv )
{
    QApplication app( argc, argv );

    QTranslator translator( 0 );
    translator.load( QString("tt3_") + QTextCodec::locale(), "." );
    app.installTranslator( &translator );

    MainWindow *mw = new MainWindow;
    app.setMainWidget( mw );
    mw->show();
    return app.exec();
}