diff --git a/gui/gui.pro b/gui/gui.pro
index 151f8b4dc..aacf6c846 100644
--- a/gui/gui.pro
+++ b/gui/gui.pro
@@ -40,6 +40,9 @@ win32 {
}
}
+# Generate the translations before we embed them
+system("lrelease gui.pro")
+
RESOURCES = gui.qrc
FORMS = about.ui \
application.ui \
diff --git a/gui/gui.qrc b/gui/gui.qrc
index e3f930927..35c3167d4 100644
--- a/gui/gui.qrc
+++ b/gui/gui.qrc
@@ -32,5 +32,18 @@
../cfg/posix.cfg
../cfg/std.cfg
../cfg/windows.cfg
+
+ cppcheck_de.qm
+ cppcheck_es.qm
+ cppcheck_fi.qm
+ cppcheck_fr.qm
+ cppcheck_it.qm
+ cppcheck_ja.qm
+ cppcheck_ko.qm
+ cppcheck_nl.qm
+ cppcheck_ru.qm
+ cppcheck_sr.qm
+ cppcheck_sv.qm
+ cppcheck_zh_CN.qm
diff --git a/gui/translationhandler.cpp b/gui/translationhandler.cpp
index 56e0ba33a..b2d0ad8c0 100644
--- a/gui/translationhandler.cpp
+++ b/gui/translationhandler.cpp
@@ -97,7 +97,7 @@ bool TranslationHandler::SetLanguage(const QString &code)
mTranslator = new QTranslator(this);
//Load the new language
- QString translationFile = "lang/" + mTranslations[index].mFilename;
+ QString translationFile = ":/" + mTranslations[index].mFilename;
if (!mTranslator->load(translationFile) && !failure) {
translationFile += ".qm";
//If it failed, lets check if the default file exists