4D v14.3

Appendix D: Use of specialized dictionaries

Home

 
4D v14.3
Appendix D: Use of specialized dictionaries

Appendix D: Use of specialized dictionaries  


 

 

4D includes a mechanism which can be used to set custom lists of words that will be accepted by the spell-check. This makes it possible to use specialized dictionaries containing terms specific to a given profession, field of application, company, etc., within an application. 

You can use several specialized dictionaries for each main language. This works with 4D and 4D Write.

For more information about the spell-check in 4D, refer to Spell-check.

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. The file can be named freely but it must end with the “.txt” suffix (for example, “astronomy.txt”).

The language subfolders are created in 4D at the following location:

  • Under Windows: (4D Application folder)\Resources\Spellcheck\
  • Under Mac OS: (4D Package):Contents:Resources:Spellcheck:

The names of the subfolders correspond to the main languages; they must not be modified:

  • English
  • French
  • German
  • Spanish
  • Norsk

Each folder contains a word file by default. You can add words to this file or add other files. User files must be stored in UTF-8 format.

The spell-check files are stored in the remote 4D application. If you want to install specialized dictionaries within a client/server solution, you must make sure that the dictionaries are installed on each remote machine (at the location described above).

The files of the specialized dictionaries are lists of words separated by carriage returns. For example:
    4D
    Server
    Desktop

You can add single words (e.g.: boogie) and compound hyphenated words (e.g.: boogie-woogie), but you cannot add sequences of words separated by spaces (e.g.: Mark Smith). 

The internal format of text files differs between Windows and Mac OS, for reasons linked more particularly to line breaks. You must thus create and provide a specialized dictionary file for each platform. To be able to transpose a dictionary file from one platform to another, you must first convert line breaks to the Mac OS or Windows format according to the destination platform, using a software such as Notepad++.

Specialized dictionaries are loaded on application startup, just 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 SPELL SET CURRENT DICTIONARY command. In this case, if a specialized dictionary exists in the corresponding language folder, it will be loaded. 

During use, there is no difference between the processing of words from standard dictionaries and those from specialized dictionaries.

 
PROPERTIES 

Product: 4D
Theme: Appendixes

 
TAGS 

Spellcheck

 
ARTICLE USAGE

4D Design Reference ( 4D v14 R2)
4D Design Reference ( 4D v12.4)
4D Design Reference ( 4D v13.4)
4D Design Reference ( 4D v14 R3)
4D Design Reference ( 4D v14.3)
4D Design Reference ( 4D v14 R4)