diff options
Diffstat (limited to 'tools/linguist/tutorial/tt2/main.cpp')
-rw-r--r-- | tools/linguist/tutorial/tt2/main.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/linguist/tutorial/tt2/main.cpp b/tools/linguist/tutorial/tt2/main.cpp new file mode 100644 index 000000000..132d4c49f --- /dev/null +++ b/tools/linguist/tutorial/tt2/main.cpp @@ -0,0 +1,26 @@ +/**************************************************************** +** +** Translation tutorial 2 +** +****************************************************************/ + +#include "mainwindow.h" + +#include <qapplication.h> +#include <qstring.h> +#include <qtextcodec.h> +#include <qtranslator.h> + +int main( int argc, char **argv ) +{ + TQApplication app( argc, argv ); + + TQTranslator translator( 0 ); + translator.load( TQString("tt2_") + TQTextCodec::locale(), "." ); + app.installTranslator( &translator ); + + MainWindow *mw = new MainWindow; + app.setMainWidget( mw ); + mw->show(); + return app.exec(); +} |