The Settings File

The settings file can be found in the ASPSpellCheck directory. It is called settings.inc.

The settings file can be used to change the default settings for your spell checker.  This can save a lot of coding later, using the ASPSpellLink Class.  In addition, some global settings can be changed in this file which cannot be set in your own scripts.

The settings file will look something like this:

<%
setting_Session = true
setting_MultiLang = false
setting_DictPath = "Dictionaries/"
setting_CustomDict = "custom.txt"
setting_CSS=""
setting_UILang = "EN"
setting_Langs = "English (International)"
setting_Grammar = True
setting_CaseSensitive = True
setting_AllCaps = True
setting_Web = True
setting_Numeric = True
setting_NewLine = True
setting_NewLine = True
setting_CentralDictionary = False
'settings_BannedWords=array("profanity","profanity")
'settings_customTextArray
%>


Modifying the settings file:

You are advised to be careful whilst editing this file, as errors can cause the ASPSpellCheck dialog not to run.

setting_Session sets the default use of session acceleration for the ASPSpellCheck Dialog. Possible values are true or false.
This is analogous to the useSession property  of the ASPSpellLink class.

setting_MultiLang forces the ASPSpellCheck Dialog to operate in Multilingual mode if set to true. Possible values are true or false.
This is analogous to the setMultiLingual method of the ASPSpellLink class.

setting_DictPath sets the path where the application looks for installed dictionaries. This path is relative to the ASPSpellCheck Directory.

setting_CustomDict sets the name of the Custom Dictionary file within the setting_DictPath. This is normally a text file, but can also be an ASP script to retrieve words from a dictionary.

setting_CSS sets the path of an external CSS used to style the Dialog.  Leaving the value as an empty string uses the default (embedded) style sheet. This is analogous to the externalCSS property of the ASPSpellLink class.

setting_UILang sets the default user interface language for the spell checking dialog.  This is analogous to the dialogLanguage property of the ASPSpellLink class.

Possible values are:

      • "EN" - For English
      • "ES" - For Spanish
      • "DE" - For German
      • "NL" - For Dutch
      • "FR" - For French
      • "IT" - For Italian
      • "PT" - For Portuguese
      • "NO" - For Norwegian
      • "SV" - For Swedish
      • "DK" - For Danish
      • "CUSTOM" - To set the dialog texts yourself.  This requires settings_customTextArray to be used (see below).

setting_Langs sets the default dictionary language for the spell checking dialog.  This relates to the dictionary property of the ASPSpellLink class.
You may stipulate more than one language in a comma separated list.

Possible values are:

      • "Deutch" - for German
      • "English (Australia)" - for Australian English
      • "English (Canada)" - for Canadian English
      • "English (International)" - for International English
      • "English (UK)" - for British English
      • "English (USA)" - for USA American English
      • "Espagnol" - for Spanish
      • "Francais"  - for French
      • "Italiano" - for Italian
      • "Nederlands" - for Dutch
      • "Portugues" - for Portuguese
      • "Svenska" - for Swedish
      • "Dansk" - for Danish

setting_Grammar   sets whether the ASPSpellCheck dialog will check grammar by default.  Possible values are true or false.
This is analogous to the checkGrmamar property of the ASPSpellLink class.

setting_CaseSensitive  sets whether the ASPSpellCheck dialog will be case sensitive by default.  Possible values are true or false.
This is analogous to the caseSensitive property of the ASPSpellLink class.

setting_AllCaps sets whether the ASPSpellCheck dialog will ignore words in all capital letters (such as acronyms) by default.  Possible values are true or false.
This is analogous to the ignoreAllCaps property of the ASPSpellLink class.

setting_Web sets whether the ASPSpellCheck dialog will ignore domains, email addresses and URLs by default.  Possible values are true or false.
This is analogous to the ignoreWebAddresses property of the ASPSpellLink class.

setting_Numeric sets whether the ASPSpellCheck dialog will ignore words with numbers in them by default.  Possible values are true or false.
This is analogous to the ignoreNumbers property of the ASPSpellLink class.

setting_NewLine sets whether the ASPSpellCheck dialog will expect a new sentence after each carriage return (new line) by default.  Possible values are true or false.
This is analogous to the newSentenceOnEachNewLine property of the ASPSpellLink class.

setting_CentralDictionary - if set True, words 'added' to the dictionary are written into the custom dictionary - "custom.txt" . All users will then have access to these words.

This is useful in intranet applications, but less so for public websites. If you wish to use the custom dictionary, you must assign IIS (IUSR_MACHINENAME) write permissions to the /ASPSpellCheck/Dictionaries directory.

setting_UseEnforcedCorrectionsFile Allows you to enforce corrections for common mistakes or inappropriate verbiage. See Enforced Corrections.

 

settings_BannedWords allows you disalow words from being used or suggested.  This is useful to block profane words.

To do so, replace this line:

'settings_BannedWords

with the following code:

settings_BannedWords = array("rude","words","in","an","array")


settings_CustomTextArray allows you change the text used on the ASPSpellCheck Dialog.

To do so, replace this line:

'settings_CustomTextArray=array("profanity","profanity")

with the following code:

settings_CustomTextArray =  Array("Spell Check", "Cancel", "OK", "Reset AutoCorrect", "Reset Personal Dictionary", "Dictionaries:", "Case Sensitive.", "Ignore ALL CAPS.", "Ignore Email and Internet Addresses.", "Ignore Words Containing Numbers.", "New Sentence for each New-Line.", "Are you sure you wish to clear your personal dictionary?", "Are you sure you wish to clear your personal Auto Corrections?", "Not Found in Dictionary:", "Grammatical  Error:", "Repeated Word:", "Suggestions:", "Dictionary language:", "Change", "Done", "Ignore Once", "Ignore All", "Add to Dictionary", "Change All", "AutoCorrect", "Undo", "Options...", "Undo Edit", "Check grammar", "( No suggestions found )", "( Delete repeated word )", "Spell-check Summary:", "Words:", "Documents:", "Edits:")

You can change any of the pieces of text within the array. Be sure to close all of your string properly.

N.B. To use this custom text, you must either set setting_UILang="CUSTOM" in the settings file, or set the ASPSpellLink.dialogLanguage to "CUSTOM" in your scripts.