cai_sebas
6th March 2005 16:39 UTC
Need tips about this problem
I need some very good tips to solve my problem.
Ive got an installer that instal a program. I want users to choose wich language of the program will be installed.
So when they choose dutch the file 'client_nl.dll' it will be copied a location an be renamed to 'client.dll'
But how do i do this and let i people choose the language cause i have 5 languages.
Thanks for any help!
Joel
6th March 2005 22:27 UTC
Did you try LangDLL? Is in your ${NSISDIR}\contrib\LangDLL
Takhir
7th March 2005 07:03 UTC
You can create LangString with lang dll definition
LangString LANG_DLL ${LANG_ENGLISH} "client_nl.dll"
and use it in the file copy
File /oname=client.dll $(LANG_DLL)
kichik
8th March 2005 19:47 UTC
That won't work. Language strings are processed at runtime. You will have to create switch. Use the LogicLib, it's pretty simple with it:
${Switch} $LANGUAGE
${Case} ${LANG_ENGLISH}
File /oname=client.dll client_en.dll
${Break}
${Case} ${LANG_FRENCH}
File /oname=client.dll client_fr.dll
${Break}
${SwitchEnd}
Takhir
8th March 2005 20:35 UTC
Yes KichiK, I found in archive first version of my NSIS multilang package and there was similar script, it's only purpose is to include all lang files to package (client_xx.dll in this case) - all files should be explicitly defined in the script to be included. But now I am using another variant - installer copies all lang files to installation folder, writes lang value to registry and program chooses lang on startup. And user can change language any time. LangDLL also uses this value on re-install. As a variant ;)