SpellCheckAsYouType (SCAYT)

SpellCheckAsYouType: Multi-language support for CKEditor 4+

The multi-language support feature is shipped together with SCAYT for CKEditor 4+ and allows users to perform spelling checks in two or more languages at once. With this functionality foreign terms and phrases are not reported as misspellings in your business and everyday communication. The multi-language functionality

  • can be enabled or disabled through a separate option in the CKEditor SCAYT plugin
  • supports all 139 languages (16 by default and 123 as additional languages)
  • is available only for CKEditor 4 hosted/licensed users.

Evaluate CKEditor SCAYT multi-language support on the following demo page.

How to Use Multi-Language Spelling Check in CKEditor 4+

  1. Enter the required multi-language text in the CKEditor.
  2. Set the required languages for the respective text abstracts. To do this, select a text abstract in the editor, click the Set language button on the Language plugin toolbar, and select the required language in the drop-down list.

The Spelling check is performed in the selected languages.

How to Enable/Disable Multi-Language Spelling Check

  1. Enable the CKEditor's language plugin. To do this, set the CKEDITOR.config.extraPlugins parameter value to 'language'.
  2. Enable multi-language support in SCAYT for CKEditor 4. To do this, set the CKEDITOR.config.scayt_multiLanguageMode parameter value to ‘true’.
  3. Define the list of languages for the Set language drop-down list on the Language plugin toolbar. To do this, set the required values for the CKEDITOR.config.language_list parameter.

Note: you can also set custom styles for the incorrect words in different languages. To do this, use the CKEDITOR.config.scayt_multiLanguageStyles parameter.

Study the sample code below for more technical information.

										<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
												"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
										<html xmlns="http://www.w3.org/1999/xhtml">
										<head>
											<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
											<script type="text/javascript" src="ckeditor/ckeditor_source.js"></script>
										</head>
										<body>
											<textarea id="editor1">
												This is an exampl of a sentence with two mispelled words.
												Just type text with misspelling to see how it works.
											</textarea>
											<script type="text/javascript">
												// For SCAYT Licensed version
												// CKEditor version higher than 4.4 or equal
												CKEDITOR.config.scayt_srcUrl = "http://spellcheck_host/spellcheck/lf/scayt3/ckscayt/ckscayt.js";
												// For SCAYT Licensed version
												// CKEditor version less than 4.4
												CKEDITOR.config.scayt_srcUrl = "http://spellcheck_host/spellcheck/lf/scayt/scayt.js";
												// For SCAYT Hosted version
												CKEDITOR.config.scayt_customerid = 'encrypted-customer-ID';
												// evaluate SCAYT on startup
												CKEDITOR.config.scayt_autoStartup = true;
												// evaluate GRAYT on startup
												CKEDITOR.config.grayt_autoStartup = true;
												// set up max suggestion count in context menu
												// all other words will be present in "More Suggestions" sub menu
												CKEDITOR.config.scayt_maxSuggestions = 4;
												// set up SCAYT default language
												CKEDITOR.config.scayt_sLang ="en_US";
												// set up User Dictionary
												CKEDITOR.config.scayt_userDictionaryName = "MyUserDictionaryName";
												// set up Custom Dictionary
												CKEDITOR.config.scayt_customDictionaryIds = "ID1, ID2";
												// enable/disable the "More Suggestions" sub-menu in the context menu.
												// The possible values are "on" or "off".
												CKEDITOR.config.scayt_moreSuggestions = 'off';
												// customize the display of SCAYT context menu commands ("Add Word", "Ignore"
												// and "Ignore All"). It must be a string with one or more of the following
												// words separated by a pipe ("|"):
												// "off": disables all options.
												// "all": enables all options.
												// "ignore": enables the "Ignore" option.
												// "ignoreall": enables the "Ignore All" option.
												// "add": enables the "Add Word" option.
												CKEDITOR.config.scayt_contextCommands = 'add|ignoreall';
												// set the visibility of the SCAYT tabs in the settings dialog and toolbar
												// button. The value must contain a "1" (enabled) or "0" (disabled) number for
												// each of the following entries, in this precise order, separated by a
												// comma (","): "Options", "Languages" and "Dictionary".
												CKEDITOR.config.scayt_uiTabs = '1,0,1';
												// Define order of placing of SCAYT context menu items by groups.
												// It must be a string with one or more of the following
												// words separated by a pipe ("|"):
												// 'suggest' - main suggestion word list
												// 'moresuggest' - more suggestions word list
												// 'control' - SCAYT commands, such as 'Ignore' and 'Add Word'
												CKEDITOR.config.scayt_contextMenuItemsOrder ='moresuggest|control|suggest';
												// Define minimum length of the words that will be collected from editor for spell-checking.
												// 'value' - any positive number
												CKEDITOR.config.scayt_minWordLength = 4;
												// Specify the names of tags that will be skipped while spell checking.
												CKEDITOR.config.scayt_elementsToIgnore = 'del,pre';
												// Disable SCAYT options storage in localStorage.
												// Possible values are:
												// "options" - disable all options storage, except "lang"
    											// "ignore-all-caps-words" - disable ignore-all-caps-words option storage
												// "ignore-domain-names" - disable ignore-domain-names option storage
												// "ignore-words-with-mixed-cases" - disable ignore-words-with-mixed-cases option storage
												// "ignore-words-with-numbers" - disable ignore-words-with-numbers option storage
												// "lang" - disable spellcheck language storage
												// "all" - disable storage of the all options
												CKEDITOR.config.scayt_disableOptionsStorage = ['lang', 'ignore-all-caps-words', 'ignore-words-with-mixed-cases']
												// enable/disable ignore-words-with-numbers option. Should be used in conjunction with scayt_disableOptionsStorage parameter  because optionStorage has higher priority then defined value by default.
												CKEDITOR.config.scayt_ignoreWordsWithNumbers = true;
												// enable/disable ignore-domain-names option. Should be used in conjunction with scayt_disableOptionsStorage parameter  because optionStorage has higher priority then defined value by default.
												CKEDITOR.config.scayt_ignoreDomainNames = true;
												// enable/disable ignore-words-with-mixed-cases option. Should be used in conjunction with scayt_disableOptionsStorage parameter  because optionStorage has higher priority then defined value by default.
												CKEDITOR.config.scayt_ignoreWordsWithMixedCases = true;
												// enable/disable ignore-all-caps-words option. Should be used in conjunction with scayt_disableOptionsStorage parameter  because optionStorage has higher priority then defined value by default.
												CKEDITOR.config.scayt_ignoreAllCapsWords = true;
												// The parameter turns on/off SCAYT initiation when Inline CKEditor is not focused.
												// SCAYT markup is taken place (SCAYT instance is not destroyed) in both Inline CKEditor`s states, focused and unfocused.

												CKEDITOR.config.scayt_inlineModeImmediateMarkup = true;

												//The multi-language parametrs
												//Enable CKEditor`s language plug-in
												CKEDITOR.config.extraPlugins = 'language';
												//Enable Multi Language support for SCAYT
												CKEDITOR.config.scayt_multiLanguageMode = true;
												//Set up the list of languages for the Language plugin toolbar drop-down
												CKEDITOR.config.language_list =
												[
								            		'en:English', 'da:Danish', 'nl:Dutch',
								            		'fi:Finish', 'fr:French', 'de:German',
								            	 	'el:Greek', 'it:Italian', 'nb:Norwegian Bokmål',
								            	 	'pt:Portuguese', 'es:Spanish', 'sv:Swedish',
								            	];
												//Set up custom styles for the incorrect words in different languages
								            	CKEDITOR.config.scayt_multiLanguageStyles = {
													'it': 'background-image: none; color: blue'
												};
												// launch CKeditor
												CKEDITOR.replace( 'editor1' );
											</script>
										</body>
										</html>