Merge branch 'google'
[mdictionary] / src / plugins / google / GooglePlugin.cpp
index ea51c5c..5a9c13f 100644 (file)
@@ -44,6 +44,19 @@ GooglePlugin::GooglePlugin(QObject *parent): CommonDictInterface(parent),
     connect(http, SIGNAL(done(bool)), this, SLOT(done()));
 }
 
+void GooglePlugin::retranslate() {
+    QString locale = QLocale::system().name();
+
+    QTranslator *googleTranslator = new QTranslator(this);
+
+    if(locale == "pl_PL")
+        googleTranslator->load(":/translations/dict_google_pl");
+    else
+        googleTranslator->load(":/translations/dict_google_en");
+
+    QCoreApplication::installTranslator(googleTranslator);
+}
+
 
 GooglePlugin::~GooglePlugin() {
     delete _settings;