home *** CD-ROM | disk | FTP | other *** search
- //
- // Language chooser script
- //
-
- declare
- STRING svLanguage;
-
- BOOL bvEnglish, bvFrench, bvGerman, bvSpanish, bvSwedish;
-
- STRING svTitle, svMsg;
- STRING svEng, svFre, svGer, svSpa, svSwe;
-
- STRING svFullPath, svRootPath, svFindStr;
- prototype BuildRootPath();
-
- 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";
-
- svFullPath = SRCDIR ^ "german.ins";
- svFindStr = "German\\german.ins";
- BuildRootPath();
-
- // 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(svRootPath ^ "English\\english.INS", "", NOWAIT);
- exit;
- endif;
-
- if(bvFrench = TRUE) then
- Enable(HOURGLASS);
- DoInstall(svRootPath ^ "French\\french.INS", "", NOWAIT);
- exit;
- endif;
-
- if(bvGerman = TRUE) then
- Enable(HOURGLASS);
- DoInstall(svFullPath, "", NOWAIT);
- exit;
- endif;
-
- if(bvSpanish = TRUE) then
- Enable(HOURGLASS);
- DoInstall(svRootPath ^ "Spanish\\spanish.INS", "", NOWAIT);
- exit;
- endif;
-
- if(bvSwedish = TRUE) then
- Enable(HOURGLASS);
- DoInstall(svRootPath ^ "Swedish\\swedish.INS", "", NOWAIT);
- exit;
- endif;
-
-
- exit;
-
-
- function BuildRootPath()
- NUMBER nStrLen, nPos;
- begin
- nStrLen = StrLength(svFullPath);
- nPos = StrFind(svFullPath, svFindStr);
-
- if (nPos >= 0 && nPos < nStrLen) then
-
- StrSub(svRootPath, svFullPath, 0, nPos);
-
- endif;
- end;