diff --git a/plugins/LinksCloud/LinksCloudPlugin.cpp b/plugins/LinksCloud/LinksCloudPlugin.cpp index 2694f1ce6..d2c844a48 100644 --- a/plugins/LinksCloud/LinksCloudPlugin.cpp +++ b/plugins/LinksCloud/LinksCloudPlugin.cpp @@ -105,7 +105,10 @@ QTranslator* LinksCloudPlugin::qt_translator(QApplication */*app*/, const QStrin } QTranslator* translator = new QTranslator(); - if (translator->load(":/lang/LinksCloud_" + languageCode + ".qm")) { + + if (translator->load(QCoreApplication::applicationDirPath() + "/translations/LinksCloud_" + languageCode + ".qm")) { + return translator; + } else if (translator->load(":/lang/LinksCloud_" + languageCode + ".qm")) { return translator; } diff --git a/plugins/VOIP/VOIPPlugin.cpp b/plugins/VOIP/VOIPPlugin.cpp index 2ebee9610..f92374686 100644 --- a/plugins/VOIP/VOIPPlugin.cpp +++ b/plugins/VOIP/VOIPPlugin.cpp @@ -164,7 +164,10 @@ QTranslator* VOIPPlugin::qt_translator(QApplication */*app*/, const QString& lan } QTranslator* translator = new QTranslator(); - if (translator->load(":/lang/VOIP_" + languageCode + ".qm")) { + + if (translator->load(QCoreApplication::applicationDirPath() + "/translations/VOIP_" + languageCode + ".qm")) { + return translator; + } else if (translator->load(":/lang/VOIP_" + languageCode + ".qm")) { return translator; } diff --git a/retroshare-gui/src/lang/languagesupport.cpp b/retroshare-gui/src/lang/languagesupport.cpp index b02501a37..476660806 100644 --- a/retroshare-gui/src/lang/languagesupport.cpp +++ b/retroshare-gui/src/lang/languagesupport.cpp @@ -153,8 +153,7 @@ LanguageSupport::translate(const QString &languageCode) if (languageCode == "en") return true; - /* Attempt to load the translations for Qt's internal widgets from their - * installed Qt directory. */ + /* Attempt to load the translations for Qt's internal widgets from their installed Qt directory. */ QString qtTranslation = QLibraryInfo::location(QLibraryInfo::TranslationsPath) + "/qt_" + languageCode + ".qm"; QTranslator *systemQtTranslator = new QTranslator(rApp); Q_CHECK_PTR(systemQtTranslator); @@ -176,7 +175,9 @@ LanguageSupport::translate(const QString &languageCode) bool result = true; - if (retroshareTranslator->load(":/lang/retroshare_" + languageCode + ".qm")) { + if (retroshareTranslator->load(QCoreApplication::applicationDirPath() + "/translations/retroshare_" + languageCode + ".qm")) { + QApplication::installTranslator(retroshareTranslator); + } else if (retroshareTranslator->load(":/lang/retroshare_" + languageCode + ".qm")) { QApplication::installTranslator(retroshareTranslator); } else { delete retroshareTranslator;