4D v13.4

SPELL GET DICTIONARY LIST

Home

 
4D v13.4
SPELL GET DICTIONARY LIST

SPELL GET DICTIONARY LIST 


 

SPELL GET DICTIONARY LIST ( langID ; langFiles ; langNames ) 
Parameter Type   Description
langID  Longint array in Unique ID of languages
langFiles  Text array in Names of language files installed
langNames  Text array in Local names of languages

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

This command returns the IDs of the Hunspell dictionaries, available beginning with 4D v12.4 and v13, (see Support of Hunspell dictionaries) as well as those of the Cordial dictionaries, available in all 4D versions with a spellchecker.

  • 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 installed on the machine. For Cordial dictionaires, a standard name is returned ("fr_FR" for the French dictionary, "en_GB" for the English one, and so on). For Hunspell dictionaires, the file names (without extensions) are returned.
  • 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.
    For Hunspell dictionaries, 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

 
PROPERTIES 

Product: 4D
Theme: Spell Checker
Number: 1204

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Created: 4D v13

 
SEE ALSO 

SPELL SET CURRENT DICTIONARY