Dictionaries are saved as Sophora system documents with a "Words" field that contains each individual word in a separate line.
Sophora includes two dictionaries as standard - the "default" dictionary and an additional dictionary called "user". In the "user" dictionary, the words added by editorial journalists within richtext fields or the copytext editor are stored. The resulting dictionary is a combination of the default and the user dictionary. In addition to adding words to the dictionary via the context menu of text fields, you can also upload an already existing dictionary.
Uploading a dictionary
Since dictionaries are saved as Sophora system documents you can import dictionaries like any other Sophora document by using Sophora-XML. Alternatively you can edit a dictionary directly in the document editor of the Sophora DeskClient:
- Open the Adminstration view.
- Expand the menu item "System" > "Dictionaries".
- Doubleclick "default" to open the "default" dictionary
- Paste the words into the "Words" field (UTF-8 encoded – each individual word in a separate line).
- Save the dictionary.
Exporting a Dictionary
You can export dictionaries like any other Sophora system document:
- Open the Adminstration view.
- Expand the menu item "System" > "Dictionaries".
- Mark the desired dictionary and open its context menu with a right-click.
- Select "Export...".
- Specify the target directory, Sophora-XML version, and other export settings.
- Start the export by clicking "Finish".
The resulting Sophora-XML file can be uploaded as described in the previous section.
Permissions
Each user who uses spell checking needs the permission to read and/or write dictionaries. To avoid having to set these document permissions for each of your configured roles, there are two specific roles that will be added to every user in the system. If you use LDAP and spell checking, you have to add these roles to the Sophora users in your LDAP system too.
dictionary_read
for reading dictionariesdictionary_write
for writing and creating dictionaries
Behind the Scenes
The "Words" field of a dictionary uses the the "Word List" input field type to handle the large list of words.