Skip to content
⌘ NSIS Forum Archive

Multiple Language And InstallDir

5 posts

Freedon Nadd#

Multiple Language And InstallDir

Hi all,

I`m trying to create a setup with multiple languages and I it was pretty easy.
Now I`m trying to set the InstallDir or $INSTDIR depending on the selected language.

in the Function .onInit

I force the user to choose the install language but doing a

StrCpy $INSTDIR "$PROGRAMFILES\${PRODUCT_PROGRAMFILES_PATH}\${RESOURCES_PRODUCT_NAME}"

doesn't seem to work.

What should I do?
Thanks for your help.
Freedon Nadd#
Forgot to mention

I forgot to mention that the ${RESOURCES_PRODUCT_NAME} is a LangString in a .nsh File.
Freedon Nadd#
Do you have a sample of multiple language and installDir, maybe it`s something else I`m doing wrong?

Thanks for your help.
LoRd_MuldeR#
Like this?

LangString RESOURCES_PRODUCT_NAME ${LANG_ENGLISH} "Fish and Chips"
LangString RESOURCES_PRODUCT_NAME ${LANG_GERMAN} "Wurst und Sauerkraut"
[...]
InstallDir "$PROGRAMFILES\$(RESOURCES_PRODUCT_NAME)"
But be sure you don't load (overwrite) the InstallDir from a previous install via InstallDirRegKey...


[EDIT]

Hmm, try adding this to the above:

Function .onGuiInit
StrCpy $INSTDIR "$PROGRAMFILES\$(RESOURCES_PRODUCT_NAME)"
FunctionEnd