creating a file depending on the language
Hi all,
I have a multi-language installer, which means the user can choose at the beginning the language in which he/she wants the installer to run. I have, at the end of the installation, to create in the $INSTDIR directory a file named language.conf which contains inside only the language in which the installer was run, eg: en or de or fr, etc. This file is later used by our programm for some other stuff.
Question: Which is the most easy and elegant solution to create the language.conf file with the correct content in the $INSTDIR dir?
I thought about 2 solutions:
1) In the installation section I check the language and for different languages I install the correct file, eg:
SetOutPath "$INSTDIR"
${Switch} $LANGUAGE
${Case} ${LANG_ENGLISH}
File "EN\language.conf"
${Break}
${Case} ${LANG_GERMAN}
File "GE\language.conf"
${Break}
${EndSwitch}
2) Using NSIS File commands create the file on the fly and make a switch after language to decide what to write into that file.
Both of the solutions seem ok, first one easier to implement, but wanted to ask here maybe there are other ways to accomplish this.
Thx,
Viv