Old 8th July 2011, 13:15   #1
isawen
Junior Member
 
Join Date: Jan 2010
Posts: 39
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

isawen is offline   Reply With Quote
Old 8th July 2011, 14:16   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 22nd July 2011, 05:50   #3
cooldude23
Junior Member
 
Join Date: Jul 2011
Posts: 2
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.
cooldude23 is offline   Reply With Quote
Old 22nd July 2011, 07:22   #4
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 22nd July 2011, 11:37   #5
cooldude23
Junior Member
 
Join Date: Jul 2011
Posts: 2
Thanks, that worked.

Btw, Where is the manual ?? I couldn't find it anywhere !!
cooldude23 is offline   Reply With Quote
Old 22nd July 2011, 12:17   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 562
Send a message via ICQ to T.Slappy
http://nsis.sourceforge.net/Docs/

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2022: www.visual-installer.com
or RAD Studio 2009 - 11 Alexandria: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump