ftuapplication/src/main.cpp
changeset 14 88ff81299c11
parent 12 624e91e1e029
child 15 4956c89a3c3f
--- a/ftuapplication/src/main.cpp	Tue Jul 06 14:06:30 2010 +0300
+++ b/ftuapplication/src/main.cpp	Wed Aug 18 09:39:42 2010 +0300
@@ -21,7 +21,7 @@
 
 #include <QtGui>
 #include <hbapplication.h>
-#include <QTranslator>
+#include <HbTranslator>
 #include <QLocale>
 #include <QTime>
 #include <QDebug>
@@ -37,31 +37,9 @@
     
     HbApplication app(argc, argv);    
 
-    QTranslator translator;
     
-    QString translation = "ftu_";
-    if(argc > 1){
-        translation.append(argv[1]);
-    }
-    else{
-        // another option to load locale could be QLocale::system().language())
-        translation.append(QLocale::system().name()); // this seems to be ftu_en_US in Windows and ftu_en_GB in WINSCW emulator and hardware
-    }
-    translator.load(translation, ":/translations" );
-    app.installTranslator(&translator);
-
-    QString exampleWizardsTranslation = "ftuexamplewizards_";
-    if(argc > 1){
-        exampleWizardsTranslation.append(argv[1]);
-    }
-    else{
-        exampleWizardsTranslation.append(QLocale::system().name());
-    }
-    QTranslator exampleWizardsTranslator;
-
-    exampleWizardsTranslator.load(exampleWizardsTranslation, ":/translations" );
-    app.installTranslator(&exampleWizardsTranslator);
-
+    HbTranslator *translator = new HbTranslator("/resource/qt/translations/","firsttimesetup");
+    
     FtuFirstTimeUse ftuFirstTimeUse;
 #ifdef ROM
     QDir::setCurrent("Z:/");    
@@ -76,5 +54,6 @@
     QDEBUG("FTU::FtuFirstTimeUse::main");
     //Work around to make sure that ftu exits
     User::Exit(0);
+    delete translator;
     return ret;       
 }