summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/taboapp/main.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/core/apps/taboapp/main.cpp b/core/apps/taboapp/main.cpp
index 497e29f..5f7f86c 100644
--- a/core/apps/taboapp/main.cpp
+++ b/core/apps/taboapp/main.cpp
@@ -13,3 +13,2 @@ int main( int argc, char **argv )
QPEApplication a( argc, argv );
- int ret = 0;
@@ -32,3 +31,2 @@ int main( int argc, char **argv )
QList<QWidget> list = iface->widgets();
-
QWidget *widget;
@@ -36,2 +34,16 @@ int main( int argc, char **argv )
tabwidget->addTab(widget, QString(*it), QString(*it));
+
+ QString lang = getenv( "LANG" );
+ if (lang.isNull())
+ lang = "en";
+ QTranslator *trans = new QTranslator(qApp);
+ QString type = (*it).left( (*it).find(".") );
+ if (type.left(3) == "lib")
+ type = type.mid(3);
+ type = type.right( type.find("lib") );
+ QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/"+type+".qm";
+ if ( trans->load( tfn ))
+ qApp->installTranslator( trans );
+ else
+ delete trans;
}