Enhancing editor settings.

This commit is contained in:
julmis
2005-01-22 10:58:25 +00:00
parent 23342b406e
commit 1bed7afc2b
3 changed files with 114 additions and 12 deletions
+11 -7
View File
@@ -19,9 +19,9 @@ if(!($lang = check_language($aspell_prog))) {
exit;
}
$aspell_opts = "-a -H --lang=$lang --encoding=utf-8";
$tempfiledir = "./";
$input_separator = "A";
$aspell_opts = '-a -H --lang='. $lang .' --encoding=utf-8';
$tempfiledir = './';
$input_separator = 'A';
function check_language($cmd) {
/// return users current language if its
@@ -30,6 +30,8 @@ function check_language($cmd) {
/// language is not in the list. If english dictionary
/// isn't found, then false is returned.
global $CFG;
error_reporting(E_ALL); // for debug, final version shouldn't have this...
clearstatcache();
$current_lang = current_language();
@@ -51,12 +53,14 @@ function check_language($cmd) {
if(in_array($current_lang,$dicts)) {
return $current_lang;
}
if(in_array("en", $dicts)) {
return "en";
}
}
if (!empty($CFG->editordictionary)) {
return $CFG->editordictionary;
}
return false;
}
// set the JavaScript variable to the submitted text.