KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Using a specialized dictionary
PRODUCT: 4D | VERSION: 2004.4 | PLATFORM: Mac & Win
Published On: May 19, 2006
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

4th Dimension 2004.4 includes a new mechanism that lets you define lists of custom words that will be accepted by the spellcheck. This makes it possible to use specialized dictionaries that contain specific terms pertaining to a given profession, application field, company, and so on, in an application. It is possible to use several specialized dictionaries for each main language.

To add a specialized dictionary in a given language, simply place a text format file in the subfolder of the main language, inside the Spellcheck folder. You can choose any file name so long as it has the ".txt" suffix (for example, "geology.txt").
The language subfolders are already created in 4th Dimension 2004.4, at the following location:

Under Windows: (4D application folder)\4D Extensions\Spellcheck\

Under Mac OS: ( 4D Package):Contents:4D Extensions:Spellcheck:
The subfolder names correspond to the main languages and must not be modified:
- English
- French
- German
- Spanish

Each folder contains a default word file. You can add words to this file or add other files.

The files of the specialized dictionaries contain lists of words separated by carriage returns, as shown here:
  4D
  Server
  Runtime
You can add single words and compound words separated by a hyphen, but you cannot add word sequences separated by spaces (e.g.: Bunny Rabbit).

You must create and provide a specialized dictionary file that is platform specific because the internal format of text files differs between Windows and Mac OS. This file must be saved in the text format of the intended platform only.

Specialized dictionaries are loaded on application startup, like standard dictionaries. The current language of the dictionaries is based on that of the application. During a session, you can change the current dictionary using the SET DICTIONARY command. If the specialized dictionary exists in the folder for the corresponding language, it is loaded.