Predefined Language

Got a problem you cannot solve? Try here.
rama1709
Posts: 4
Joined: Wed Sep 18, 2013 3:08 am

Predefined Language

Postby rama1709 » Wed Feb 26, 2014 4:11 am

I use the pre defined variable LANGUAGE to find out, if the selected installation language is German or not. Dependend of this information i want install a german or an english help file. The code i used is the following:

Code: Select all

Set Variable INSTALLLANG to $LANGUAGE$
...

 if Variable INSTALLLANG Equals German
    Create Shortcut $SHORTCUTFOLDER$\Hilfe to $TARGETDIR$\system\help\deutsch\ems-edm.chm, Pin to Start Menu
 else
    Create Shortcut $SHORTCUTFOLDER$\Hilfe to $TARGETDIR$\system\help\english\ems-edm.chm, Pin to Start Menu
 end


I watch the Variable INSTALLANG in debug mode and the value ist German but always the else part is executed. Where ist the mistake?

bokkie
Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: Predefined Language

Postby bokkie » Wed Feb 26, 2014 7:25 am

The help definition for the pre-defined language variable says:

LANGUAGE: Set to an empty string in non multi-lingual installs. In multi-lingual installs, holds the active language. Assign a new value to this variable to change the active language from within your setup script in multi-lingual installs.

Likely result is that the language value might be null. Consider displaying it's value in a message box before the 'if' statement. That will confirm if it has a language value.
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Predefined Language

Postby FrancescoT » Wed Feb 26, 2014 11:21 am

Dear rama1709,

What Peter posted it is correct!

If you want to conditionally create your shortcut based on target OS Language, you can use the "Get System Setting" command to assign your INSTALLLANG variable.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

rama1709
Posts: 4
Joined: Wed Sep 18, 2013 3:08 am

Re: Predefined Language

Postby rama1709 » Wed Jun 25, 2014 8:50 am

The only problem was the was the spelling of German and GERMAN. I use the Statement in this way

Code: Select all

  if Variable MyLANG Contains (Ignore Case) GERMAN


and it works.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Predefined Language

Postby FrancescoT » Wed Jun 25, 2014 11:10 am

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 116 guests