Hello,
I use NSIS to install my application on Windows. Then, a license manager is used. By default, this license manager shows options (ex. evaluate, buy) in English. The license manager has different files for each language in separate folders. For instance I have the file app1.xml in folder "English" and the same app1.xml in folder "French".
At installation, with NSIS, the user selects a language (either English or French for now). With that information, I would like to copy either app1.xml from the "English" folder or from the "French" folder to the ".exe" folder.
Is that possible ? How can I do this ?
Thank you very much,
Alex
Extract files based on installer language
7 posts
The chosen Windows language id is stored in the $language variable.
Perfect thank you very much.
I'm just unsure as to what to do next.
In the section where I copy files, for instance:
Something like
Would you have an example ?
Thank you so much !
I'm just unsure as to what to do next.
In the section where I copy files, for instance:
Section "MainSection" SEC01How can I choose the folder ?
SetOutPath "$INSTDIR"
File "..\..\AssystMouse\English\app1.xml"
Something like
if $language==1?
File "..\..\AssystMouse\French\app1.xml"
Would you have an example ?
Thank you so much !
Something like this
!include LogicLib.nsh
Section
SetOutPath $InstDir
${If} $Language = 1033 ; Can also use ${LANG_ENGLISH}
File "English.txt"
${Else}
File "French.txt"
${EndIf}
SectionEnd
Thank you so much ! It works !!
Is it possible that it works without !include LogicLib.nsh ?
I didn't use it by mistake and it worked. Should I still include it just in case ?
Thank you so much again !
Alex
Is it possible that it works without !include LogicLib.nsh ?
I didn't use it by mistake and it worked. Should I still include it just in case ?
Thank you so much again !
Alex
If it worked without it, then LogicLib.nsh was already !include'd elsewhere, otherwise the "${If}", etc. macros would not have been defined. LogicLib sets up defines so it won't try to load itself twice, so it's best to !include it in your main .nsi file, since if you stopped using whatever header file that had the "!include LogicLib.nsh" in it, then those macros would break.
Perfect, thank you so much again for your help !!