Page 1 of 1

Predefined Language

Posted: Wed Feb 26, 2014 4:11 am
by rama1709
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?

Re: Predefined Language

Posted: Wed Feb 26, 2014 7:25 am
by bokkie
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.

Re: Predefined Language

Posted: Wed Feb 26, 2014 11:21 am
by FrancescoT
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

Re: Predefined Language

Posted: Wed Jun 25, 2014 8:50 am
by rama1709
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.

Re: Predefined Language

Posted: Wed Jun 25, 2014 11:10 am
by FrancescoT
:D