Archive: silent install / multilanguage


silent install / multilanguage
Hello,

I have to add silent install support to one of our intallers.
Our installer has multi language support.
How can I choose the language to install during a silent install ?
Maybe with an answer file ? But how ? The languages have IDs or should I check the name of the language ?

Thanks.


I don't think NSIS has a built in command line switch for specifying the language but it is straight forward to add one using GetParameters followed by GetOptions. For example:


${If} ${Silent}
${GetParameters} $R0
${GetOptions} $R0 `/lang=` $LANGUAGE
${Else}
.. display language selection
${EndIf}


If you don't want to specify locale id's you could specify language names (i.e. /lang=English) and you'd then need to:

${GetParameters} $R0
${GetOptions} $R0 `/lang=` $R0
${If} $R0 == `English`
StrCpy $LANGUAGE ${LANG_ENGLISH}
${ElseIf} $R0 == ...
...
${EndIf}


Stu

Thanks,
I will try it.