4D v16.3

SPELL SET CURRENT DICTIONARY

Home

 
4D v16.3
SPELL SET CURRENT DICTIONARY

SPELL SET CURRENT DICTIONARY 


 

SPELL SET CURRENT DICTIONARY ( dictionary ) 
Parameter Type   Description
dictionary  Longint, Text in ID, Name, or Language code of dictionary to use for spell-check

The SPELL SET CURRENT DICTIONARY command causes the replacement of the current dictionary with the one specified by the dictionary parameter. The current dictionary is used for the built-in spell-check feature in 4D (for more information, refer to the 4D Design Reference manual) as well as the one in the 4D Write and 4D View plug-ins. The modification of the current dictionary is reflected immediately in all the processes of the database for the session, as well as in the 4D Write and 4D View plug-in areas.

By default, 4D uses:

  • under Windows, the Hunspell dictionary corresponding to the application language,
  • under OS X, the native spell checker.

Note: For more information about Hunspell dictionaries, refer to the Support of Hunspell dictionaries section.

You can use the dictionary parameter to change the dictionary. You can pass either:

  • a Hunspell dictionary ID number (returned by the SPELL GET DICTIONARY LIST command),
  • a Hunspell dictionary name (corresponding to the file name of the Hunspell dictionary, with or without its extension),
  • a BCP 47, ISO 639-1 or ISO 639-2 language code. For example, with the BCP 47 language code "en-US" indicates American English and "en-GB" specifies British English. These codes are redirected internally to the corresponding current dictionary (Hunspell or native OS X).

Compatibility note: In previous versions of 4D, "Cordial" dictionaries were supported. For compatibility, it is still possible to pass a "Cordial" dictionary number in the dictionary parameter (value or constant from the "Dictionaries" theme). In this case, however, the dictionary is redirected internally to an equivalent Hunspell dictionary (or the native dictionary under OS X). 

If the dictionary is loaded correctly, the system variable OK is set to 1; otherwise, it is set to 0 and an error is returned.

Example  

Loading of the "fr-classic" dictionary found in the Hunspell folder:

 SPELL SET CURRENT DICTIONARY("fr-classic")
  // SPELL SET CURRENT DICTIONARY ("FR-classic.dic") is valid



See also 

SPELL CHECKING
SPELL Get current dictionary
SPELL GET DICTIONARY LIST

 
PROPERTIES 

Product: 4D
Theme: Spell Checker
Number: 904

The OK variable is changed by the command

 
HISTORY 

Modified: 4D 2004.5
Modified: 4D v13
Renamed: 4D v13
Modified: 4D v14

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)