Ask settings dialog about kernel-config
[qcpufreq] / src / main.cpp
old mode 100755 (executable)
new mode 100644 (file)
index ac21d60..b63917c
@@ -1,6 +1,6 @@
 /*
  * QCPUFreq - a simple cpufreq GUI
- * Copyright (C) 2010 Daniel Klaffenbach <daniel.klaffenbach@cs.tu-chemnitz.de>
+ * Copyright (C) 2010 Daniel Klaffenbach <danielklaffenbach@gmail.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  */
 
 #include <QtGui/QApplication>
+#include <QTranslator>
+#include <QString>
+#include <QLocale>
 #include "mainwindow.h"
 
+
 int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
+
+    QString locale = QLocale::system().name();
+    QStringList tmp = locale.split("_");
+    locale = tmp.first();
+    QString localedir = "/opt/usr/share/qcpufreq";
+    QTranslator translator;
+    translator.load( locale, localedir );
+    a.installTranslator( &translator );
+
     MainWindow w;
 #if defined(Q_WS_S60)
     w.showMaximized();