Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Install application in multiple languages (http://forums.winamp.com/showthread.php?t=332270)

isawen 8th July 2011 13:15

Install application in multiple languages
 
I have an installer which installs my application. During the installation the user is prompted to select the language in which the application will be running. Based on the selected language during the installation I'm gonna extract the documentation files in the used selected language.
The problem I'm facing is that on the page where the user selects the installation directory the installer says that it needs more space than it should required. I guess that if my installed embeds all the languages documentation files before extracting them the installer assumes all the files will be extracted and that's why its shows the size of the application with all languages doc files.

What could I do in order for the installer to display the exact size which is going to be extracted and not the size of all embedded files?

Would different sections help me? The section selection could be performed outside the .onInit function (for example after the user leave the language selection page) ?

Thanks,
Isawen

Afrow UK 8th July 2011 14:16

You could either use multiple sections (and only select one depending on $LANGUAGE) or just set the section size yourself with SectionSetSize. I think the first option is best.

Stu

cooldude23 22nd July 2011 05:50

I also want to do something like this.
Create a installer with multiple section, one section being language file, how I do select the language file (or section) based on the language the user selected using $LANGUAGE.
I couldn't find any documentation on that.

MSG 22nd July 2011 07:22

SetOutPath $INSTDIR
${If} $LANGUAGE == 1033 #English
File "c:\ProjectPath\English.ext"
${ElseIf} $LANGUAGE == somethingelse
File "c:\ProjectPath\Language2.ext"
${EndIf}


Disclaimer: I never use multiple languages, so I'm just going on what the manual says.

cooldude23 22nd July 2011 11:37

Thanks, that worked.

Btw, Where is the manual ?? I couldn't find it anywhere !!

T.Slappy 22nd July 2011 12:17

http://nsis.sourceforge.net/Docs/ :)


All times are GMT. The time now is 17:40.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.