String bug fix
[squirrelmail.git] / plugins / squirrelspell / modules / init.mod.php
CommitLineData
849bdf42 1<?php
2/**
3 INIT.MOD.PHP
4 -------------
5 Initial loading of the popup window interface.
6 **/
7
8 // See if we need to give user the option of choosing which dictionary
9 // he wants to use to spellcheck his message.
10 $langs=sqspell_getSettings(null);
11 $msg="<form method=\"post\">
12 <input type=\"hidden\" name=\"MOD\" value=\"check_me\">
13 <input type=\"hidden\" name=\"sqspell_text\">
14 <p align=\"center\">";
15 if (sizeof($langs)==1){
16 // only one dictionary defined by the users. Submit the form
17 // automatically.
18 $onload="sqspell_init(true)";
158d478f 19 $msg .= _("Please wait, communicating with the server...") .
20 '</p>'.
21 "<input type=\"hidden\" name=\"sqspell_use_app\" value=\"$langs[0]\">";
849bdf42 22 } else {
23 // more than one dictionary. Let the user choose the dictionary first
24 // then manually submit the form.
25 $onload="sqspell_init(false)";
158d478f 26 $msg .= _("Please choose which dictionary you would like to use to spellcheck this message:").
27 '</p><p align="center">' .
28 '<select name="sqspell_use_app">';
849bdf42 29 for ($i=0; $i<sizeof($langs); $i++){
30 $msg .= "<option";
31 if (!$i) $msg .= " selected";
32 $msg .= ">$langs[$i]</option>\n";
33 }
158d478f 34
849bdf42 35 $msg .= " </select>
36 <input type=\"submit\" value=\"Go\">
37 </p>
38 ";
39 }
40 $msg .="</form>\n";
158d478f 41 sqspell_makeWindow($onload, _("SquirrelSpell Initiating"), "init.js", $msg);
42?>