//
// Language chooser script
//

declare
        STRING svLanguage;

        BOOL bvEnglish, bvFrench, bvGerman, bvSpanish, bvSwedish;

        STRING svTitle, svMsg;
        STRING svEng, svFre, svGer, svSpa, svSwe;

program

StartHere:
        Disable(BACKGROUND);
        Disable(BACKBUTTON);
        Enable(DIALOGCACHE);

        bvEnglish = FALSE;
		bvFrench = FALSE;
		bvGerman = TRUE;
		bvSpanish = FALSE;
		bvSwedish = FALSE;

        svTitle = "Setup-Sprache wählen";
        svMsg   = "Sprache für Installation wählen:";
        svEng   = "Englisch";
        svFre   = "Französisch";
        svGer   = "Deutsch";
        svSpa   = "Spanisch";
        svSwe   = "Schwedisch";

        // Prompt for language to install
        SetDialogTitle(DLG_ASK_OPTIONS, svTitle);

		AskOptions(EXCLUSIVE, svMsg, svEng, bvEnglish, svFre, bvFrench, svGer, bvGerman, svSpa, bvSpanish,
				    svSwe, bvSwedish);

        // Kick off the specified language's installer
        if(bvEnglish = TRUE) then
            Enable(HOURGLASS);
            DoInstall(SRCDIR ^ "english.INS", "", NOWAIT);
            exit;
        endif;

        if(bvFrench = TRUE) then
            Enable(HOURGLASS);
            DoInstall(SRCDIR ^ "french.INS", "", NOWAIT);
            exit;
        endif;

        if(bvGerman = TRUE) then
            Enable(HOURGLASS);
            DoInstall(SRCDIR ^ "german.INS", "", NOWAIT);
            exit;
        endif;

        if(bvSpanish = TRUE) then
            Enable(HOURGLASS);
            DoInstall(SRCDIR ^ "spanish.INS", "", NOWAIT);
            exit;
        endif;

        if(bvSwedish = TRUE) then
            Enable(HOURGLASS);
            DoInstall(SRCDIR ^ "swedish.INS", "", NOWAIT);
            exit;
        endif;


exit;
