Using Different Dictionaries with Ephox EditLive! for Java

Introduction

Ephox EditLive! for Java can be configured to use different spell checkers so that it can be used in different countries and regions.  The specification of the spell checker to use with EditLive! for Java is performed via the EditLive! for Java XML configuration.

Users can also add words to the local dictionary.  These customizations to the EditLive! for Java dictionary are particular to a single client as the customizations are preserved on the client.  To customize the dictionary on the server please refer to the article on Creating Custom Dictionaries for EditLive! for Java

Setting the Spell Checker for EditLive! for Java

The spell checkers for EditLive! for Java for different languages are each packaged as separate files.  In order to configure EditLive! for Java to use a spell checker the program must be informed of the location of the relevant spell checking package, this occurs via the EditLive! for Java XML configuration.  The <spellCheck> element of the EditLive! for Java XML configuration provides EditLive! for Java with the location of the spell checker package which it is to use.  The location is specified as a URL which can be either relative or absolute.

Dictionaries for the EditLive! for Java spell checker can be found in the webfolder/redistributables/editlivejava/dictionaries folder of your EditLive! for Java install.  In order to use these dictionaries with EditLive! for Java the <spellCheck> element of the EditLive! for Java XML configuration should be modified to reflect the location of the dictionary to be used. 

Note: The file name of the .jar file for the spell checker dictionary for use with EditLive! for Java must use all lower case letters.

Adding Words to the Local Dictionary

Users can also add words to the dictionary which are then stored locally on the client.  Any words added to the local dictionary by users will persist on the client even when the dictionary is updated on the server.  Words are added to the local dictionary when a user clicks the "Add Word" option on the spell checker.

Example

The following example demonstrates how to configure EditLive! for Java to use the United States English spell checking package as its spell checker.  In this example the relevant package can be found via the URL redistributables/editlivejava/dictionaries/en_us_3_0.jar.  This example is a partial EditLive! for Java XML configuration.

<editLiveForJava>
    ...
    <spellCheck jar="redistributables/editlivejava/dictionaries/en_us_3_0.jar" />
    ...
</editLiveForJava>

Available Spell Checkers

File Name Language
en_us_3_0.jar English (US)
en_br_3_0.jar English (UK)
pb_3_0.jar Brazilian Portuguese
da_3_0.jar Danish
du_3_0.jar Dutch
fi_3_0.jar Finnish
fr_3_0.jar French - European and Canadian
ge_3_0.jar German
it_3_0.jar Italian
no_3_0.jar Norwegian
po_3_0.jar Portuguese (Iberian)
sp_3_0.jar Spanish - European, Mexican and South American
sw_3_0.jar Swedish

Summary

The spell checker for EditLive! for Java can be configured according to the language which you wish to use with EditLive! for Java.  Each spell checker for EditLive! for Java is provided as an individual package separate from the EditLive! for Java applet package.  In order to specify the spell checker to be used with EditLive! for Java the XML configuration for the relevant instance of EditLive! for Java must include a URL indicating the spell checking package in the <spellCheck> element.

See Also