Skip to main content
Version: Next

SPELL GET DICTIONARY LIST

SPELL GET DICTIONARY LIST ( langID ; langFiles ; langNames )

ParameterTypeDescription
langIDArray integerUnique ID of languages
langFilesText arrayNames of language files installed
langNamesText arrayLocal names of languages

Description

The SPELL GET DICTIONARY LIST command returns, in the langID, langFiles and langNames arrays, the IDs, file names and language names corresponding to the Hunspell dictionary files installed on the machine.

Note: For more information about Hunspell dictionaries, refer to the Spell checking section in the Design Reference manual.

  • langID receives the ID numbers generated automatically and used with the SPELL SET CURRENT DICTIONARY command.
    Note that the IDs are unique and based on the file names. This command is mainly useful during development; you do not have to regenerate the IDs each time the database is executed.
  • langFiles receives the names of the dictionary files (without extensions) installed on the machine.
  • langNames receives the names of the languages expressed in the current application language. For example, for a French dictionary, the value "français (France)" is returned on a machine configured in French and "French (France)" on an English system. The language name is followed by "- Hunspell". This field is only valid for files "known" by 4D. For unknown files (for example, custom files), the name "N/A - Hunspell" is returned. This does not prevent you from using the dictionary (if the file concerned is valid), the ID returned may be passed to the SPELL SET CURRENT DICTIONARY command.

Example

You put "fr-classic+reform1990.aff" and "fr-classic+reform1990.dic" as well as "fr-dentist.aff" and "fr-dentist.dic" into the Hunspell directory:

 ARRAY LONGINT($langID;0)
 ARRAY TEXT($dicName;0)
 ARRAY TEXT($langDesc;0)
 SPELL GET DICTIONARY LIST($langID;$dictName;$langDesc)
$langID$dictName$langDesc
65536en_GBEnglish (UK)
65792en_USEnglish (USA)
131072de_DEGerman (Germany)
196608es_ESSpanish
262144fr_FRFrench (France)
589824nb_NONorwegian Bokmal (Norway)
1074036166fr-classic+reform1990French (France) - Hunspell
1073901273fr-dentistNo description - Hunspell

See also

SPELL SET CURRENT DICTIONARY

Properties

Command number1204
Thread safe