diff --git a/src/Application.cpp b/src/Application.cpp index 791e3efb..5c746eb5 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -30,7 +30,9 @@ Application::Application(int& argc, char** argv) : // First of all try to load the application translation file. m_translatorApp = new QTranslator(this); - ok = m_translatorApp->load("sqlb_" + name, "translations"); + ok = m_translatorApp->load("sqlb_" + name, + QCoreApplication::applicationDirPath() + "/translations"); + if (ok == true) { PreferencesDialog::setSettingsValue("General", "language", name); installTranslator(m_translatorApp); diff --git a/src/PreferencesDialog.cpp b/src/PreferencesDialog.cpp index 3cd8cca5..41458067 100644 --- a/src/PreferencesDialog.cpp +++ b/src/PreferencesDialog.cpp @@ -265,7 +265,9 @@ void PreferencesDialog::removeExtension() void PreferencesDialog::fillLanguageBox() { - QDir translationsDir("translations", "sqlb_*.qm"); + // Use the path relative to the main executable + QDir translationsDir(QCoreApplication::applicationDirPath() + "/translations", + "sqlb_*.qm"); // Add default language ui->languageComboBox->addItem("English (United States)", "en_US");