spellCheckOp() (tick_24Validator Engine Only)

void spellCheckOp(int $op[, optional arguments]);

$op - specifies what spell checking operation to perform

1 - clear all active main dictionaries, but first save them so they can be automatically restored when the current element ends

2 - add main dictionaries - provide the name of the dictionaries to add in the optional arguments

3 - same as 2, but save and clear all active main dictionaries first, and if no dictionaries to add, then disable spell checking for the element

The main dictionaries are also called the current active dictionaries, and are used when checking a word to see if it is acceptable (i.e. spelled correctly).

This function can only be used in tag, attribute, and attribute value programs, but is usually used in attribute programs.

This function is supported by CSE HTML Validator v14.00 and later.


Use runProgram(4) in an attribute program to check the attribute's value for misspelled words

Use checkString(32768,$string) to check a string for misspelled words


The following function was taken from the default configuration. It is called when a "lang" or "xml:lang" attribute is encountered to 1) save the current main dictionary list (so it can be automatically restored later), 2) clear the dictionary list, and 3) update the dictionary list. The new dictionary list is based on the language specified by CurrentAttValue.

function AWUpdateSpellingDictionaries() {
 if isSpellCheckingEnabled {
  if beginsWithNoCase(CurrentAttValue,"en") { // English
   if beginsWithNoCase(CurrentAttValue,"en-au") {
   else {
    if beginsWithNoCase(CurrentAttValue,"en-gb") {
    else {
  elseif beginsWithNoCase(CurrentAttValue,"fr") {
   spellCheckOp(3,"french.adm"); }
  elseif beginsWithNoCase(CurrentAttValue,"de") {
   spellCheckOp(3,"GT_Neu.adm"); }
  elseif beginsWithNoCase(CurrentAttValue,"es") {
   spellCheckOp(3,"spanish.adm"); }
  elseif beginsWithNoCase(CurrentAttValue,"pt") {
   spellCheckOp(3,"portuguese.adm"); }
  else { spellCheckOp(3); } // disable spell checking for element by not specifying any dictionaries