Table of Contents

Extending the spell checker to other languages


Only available versions of this content are shown in the dropdown
Applicable to Theme Cosmos applications

Ensure correct spelling and diversify the scope of the spell checker in the rich text editors (RTEs) in your application, by defining additional supported locales.

By default, the spell checker verifies spelling according to the language that is associated with the locale of the user. By modifying the pyDefaultSpellCheckLocale decision table, you expand the list of languages for the spell checker.
Ensure that you have a property with a list of supported languages from which a user can select the language for the spell checker. For example, create a drop-down list that is based on a value list property that includes the options for American English and British English.
  1. In the navigation pane of Dev Studio, click Records.

  2. Expand the Decision category, and then click Decision Table.

  3. Locate and open the pyDefaultSpellCheckLocale decision table.

  4. Save an instance of the decision table in your ruleset by clicking Save as Specialize by class or ruleset .

  5. Complete the Decision Table Record Configuration form.

  6. Click Create and open.

  7. Click the header of the Default column.

  8. In the Select property modal dialog box, in the Property field, enter the name of the property that contains values for the supported languages, and then click Save.

  9. Define the conditions and actions for the additional locale and the default locale based on the values in the property.

    For a user who wants to default to American English and have the option to switch to British English, define the following logic:
    Spell checker support for an additional locale
    An example of a modified decision table with support for American
                                and British spelling.
  10. Click Save.

At run time, the user can now select the language in which they want to enter text, for example, in a drop-down list, and the spell checker validates the text for correctness in that language.
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.