diff --git a/gpxsee.qrc b/gpxsee.qrc
index 6f2d14eb..90a57df4 100644
--- a/gpxsee.qrc
+++ b/gpxsee.qrc
@@ -20,10 +20,5 @@
icons/system-run.png
icons/document-print-preview.png
icons/view-filter.png
- lang/gpxsee_cs.qm
- lang/gpxsee_sv.qm
- lang/gpxsee_de.qm
- lang/gpxsee_ru.qm
- lang/gpxsee_fi.qm
diff --git a/pkg/gpxsee.nsi b/pkg/gpxsee.nsi
index 81ec9ce8..96858ae3 100644
--- a/pkg/gpxsee.nsi
+++ b/pkg/gpxsee.nsi
@@ -196,6 +196,29 @@ Section "ANGLE" SEC_ANGLE
SectionEnd
+SectionGroup "Localization" SEC_LOCALE
+ Section "Czech"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_cs.qm locale\gpxsee_cs.qm
+ SectionEnd
+ Section "German"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_de.qm locale\gpxsee_de.qm
+ SectionEnd
+ Section "Finish"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_fi.qm locale\gpxsee_fi.qm
+ SectionEnd
+ Section "Russian"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_ru.qm locale\gpxsee_ru.qm
+ SectionEnd
+ Section "Swedish"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_sv.qm locale\gpxsee_sv.qm
+ SectionEnd
+SectionGroupEnd
+
;--------------------------------
; Uninstaller
@@ -247,6 +270,8 @@ LangString DESC_ANGLE ${LANG_ENGLISH} \
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
LangString DESC_APP ${LANG_ENGLISH} \
"GPXSee application"
+LangString DESC_LOCALE ${LANG_ENGLISH} \
+ "Localization"
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@@ -255,4 +280,5 @@ LangString DESC_APP ${LANG_ENGLISH} \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
+ !insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALE} $(DESC_LOCALE)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
diff --git a/pkg/gpxsee64.nsi b/pkg/gpxsee64.nsi
index 163cd975..9129ba58 100644
--- a/pkg/gpxsee64.nsi
+++ b/pkg/gpxsee64.nsi
@@ -198,6 +198,29 @@ Section "ANGLE" SEC_ANGLE
SectionEnd
+SectionGroup "Localization" SEC_LOCALE
+ Section "Czech"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_cs.qm locale\gpxsee_cs.qm
+ SectionEnd
+ Section "German"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_de.qm locale\gpxsee_de.qm
+ SectionEnd
+ Section "Finish"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_fi.qm locale\gpxsee_fi.qm
+ SectionEnd
+ Section "Russian"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_ru.qm locale\gpxsee_ru.qm
+ SectionEnd
+ Section "Swedish"
+ CreateDirectory "$INSTDIR\locale"
+ File /oname=locale\gpxsee_sv.qm locale\gpxsee_sv.qm
+ SectionEnd
+SectionGroupEnd
+
;--------------------------------
; Uninstaller
@@ -250,6 +273,8 @@ LangString DESC_ANGLE ${LANG_ENGLISH} \
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
LangString DESC_APP ${LANG_ENGLISH} \
"GPXSee application"
+LangString DESC_LOCALE ${LANG_ENGLISH} \
+ "Localization"
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
@@ -258,4 +283,5 @@ LangString DESC_APP ${LANG_ENGLISH} \
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
-!insertmacro MUI_FUNCTION_DESCRIPTION_END
+ !insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALE} $(DESC_LOCALE)
+!insertmacro MUI_FUNCTION_DESCRIPTION_END
\ No newline at end of file
diff --git a/src/GUI/app.cpp b/src/GUI/app.cpp
index eccf1d64..3c4aee53 100644
--- a/src/GUI/app.cpp
+++ b/src/GUI/app.cpp
@@ -19,8 +19,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
_argc(argc), _argv(argv)
{
QTranslator *gpxsee = new QTranslator(this);
- QString locale = QLocale::system().name();
- gpxsee->load(QString(":/lang/gpxsee_") + locale);
+ gpxsee->load(QLocale::system(), "gpxsee", "_", LOCALE_DIR);
installTranslator(gpxsee);
QTranslator *qt = new QTranslator(this);
diff --git a/src/config.h b/src/config.h
index 6f1b76b9..b3defcf3 100644
--- a/src/config.h
+++ b/src/config.h
@@ -41,5 +41,6 @@
#define GLOBAL_MAP_DIR GLOBAL_DIR + QString("/") + MAP_DIR
#define GLOBAL_POI_DIR GLOBAL_DIR + QString("/") + POI_DIR
#define TILES_DIR USER_DIR + QString("/tiles")
+#define LOCALE_DIR GLOBAL_DIR + QString("/locale")
#endif /* CONFIG_H */