close

Filter

loading table of contents...

Site Manager Developer Manual / Version 2304

Table Of Contents

5.2.6 Configuring the Spell checker

Using these elements, the configuration of the spell checker can be done.

<Spellchecker>

Child elements: <MainDictionary>, <CustomDictionary>

Parent elements: <Editor>

<Editor>
  [...]
  <SpellChecker enabled="false" />

  <SpellChecker enabled="true" os="Windows">
    <MainDictionary class=
       "com.coremedia.spellchecker.Bridge2JavaWordDictionary"/>      
    <CustomDictionary class=
       "hox.corem.editor.spellchecker.Dictionary"/>
  </SpellChecker>

  [...]
</Editor>

Example 5.46. Example of a Spellchecker element


Use this element to enable or disable the spell checker. It's also the container element for the configuration of the spell checker.

Attribute Description
enabled This attribute determines whether the spell checker should be used ("true") or should be disabled ("false"). By default, "false" is used.
os Restricts the configured spell checker to a given operating system. The value is compared to Java's system property os.name. Common value is for example Windows. The configuration with the best (that is, longest) match wins. So for example if you have a spell checker configured with os="Windows" and another with os="Windows 7" and you are running on Windows 7 the second one will be taken. Default is to match all operating systems. So the example above says: Disable the spell checker on all operating systems but on Windows.

Table 5.67. Attribute of the element SpellChecker


<MainDictionary>

Child elements:

Parent elements: <SpellChecker>

<Editor>
        .
        <SpellChecker enabled="true">
                <MainDictionary 
  class="com.coremedia.spellchecker.Bridge2JavaWordDictionary"/>
                .
        </SpellChecker>
        .
</Editor>

Example 5.47. Example of a MainDictionary element


This element is used to determine the class used for integrating an external dictionary in the spell checker. As a default, the Microsoft Word dictionary will be used. Please keep in mind, that it is not possible to write from CoreMedia CMS to the Word user dictionary. If the Word user dictionary should be used for spell checking, you need to activate this option in Word itself (please refer to the Word documentation).

Attributes

Description

class

With this attribute, the class used for determining the dictionary used in the spell checker is configured. By default, the class com.coremedia.spell checker.Bridge2JavaWordDictionary will be used. This class integrates the dictionary of a Microsoft Word installation. It takes the file properties/corem/language-mapping.properties to map the Java locale (de_DE, for example) to the Word locale (wdGerman, for example). The spell checker checks whether a language exists in Word or not. If the language does not exist, an error message will be shown and all properties using the language will not be checked (see the element PropertyLanguageResolverFactory). If you are sure that the language is installed with Word you might check the language-mapping.properties file for the correct mapping. Maybe you need to add the appropriate mapping.

For own classes, the interface com.coremedia.spellchecker.Dictionary must be implemented.

Table 5.68. Attributes of the MainDictionary element


<CustomDictionary>

Child elements:

Parent elements: <SpellChecker>

<Editor>
        .
        <SpellChecker enabled="true">
                <CustomDictionary 
                class="hox.corem.editor.spellchecker.Dictionary"/>
                .
        </SpellChecker>
        .
</Editor>

Example 5.48. Example of a CustomDictionary element


This element is used to determine the class used for integrating a customized dictionary in the spell checker. The entries of this dictionary will be used for spell checking and for suggestions.

Attributes Description
class

With this attribute the class used for determining the customized dictionary used in the spell checker is configured. By default, the class hox.corem.editor.spellchecker.Dictionary will be used. This class uses two customized dictionary created in the folder tree of the CoreMedia System. For usage of these dictionaries see the User Manual.

For own classes, the interface com.coremedia.spellchecker.CustomDictionary must be implemented.

Table 5.69. Attribute of the <CustomDictionary> element


<PropertyLanguageResolverFactory>

Child elements:

Parent elements: <Editor>

<Editor>
        .
        <PropertyLanguageResolverFactory 
        class=
      "hox.corem.editor.DefaultPropertyLanguageResolverFactory"/>
        .
</Editor>

Example 5.49. Example of a PropertyLanguageResolver Factory element


This element is used to configure a class which determines the language used in a property. This information is used for the spell checker. For the default class hox.corem.editor.DefaultPropertyLanguageResolverFactory the additional attributes language and country can be used to override the settings of the element Locale.

Attribute

Description

class

With this attribute the class used for determining the language of a property is configured. By default, the class hox.corem.editor.DefaultPropertyLanguageResolverFactory will be used. This class sets the language of all properties used for the spell checker to the value defined via the element <Locale>. You can override this setting with the attributes language and country of the default language resolver factory.

For own classes, the interface hox.corem.editor.PropertyLanguageResolverFactory must be implemented.

Table 5.70. Attribute of the PropertyLanguageResolverFactory element


Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.