4D v13.4

SPELL SET CURRENT DICTIONARY

Home

 
4D v13.4
SPELL SET CURRENT DICTIONARY

SPELL SET CURRENT DICTIONARY 


 

SPELL SET CURRENT DICTIONARY {( dictionary )} 
Parameter Type   Description
dictionary  Longint, Text in ID or Name of dictionary to use for spell-check
If omitted = restore default dictionary

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 the Cordial dictionary corresponding to the application language. You can restore the default dictionary at any time by calling the SPELL SET CURRENT DICTIONARY command without a parameter. 

You can use the dictionary parameter to load two types of dictionaries:

  • a Hunspell dictionary: In this case, in the dictionary parameter, you can pass either an ID number (returned by the SPELL GET DICTIONARY LIST command), or a name (corresponding to the name of the Hunspell dictionary file, with or without its extension). The OK variable  is set to 1 when the dictionary is loaded correctly. For more information about Hunspell dictionaries, refer to the Support of Hunspell dictionaries section.
  • a Cordial dictionary: In this case, in the dictionary parameter, you pass a dictionary number (longint). Five main dictionaries are available: English, French, German, Spanish and Norwegian. You can use one of the following predefined constants, found in the Dictionaries theme:
    Constant Type Value
    English Dictionary Longint 69632
    French Dictionary Longint 262144
    German Dictionary Longint 131584
    Norwegian Dictionary Longint 589824
    Spanish Dictionary Longint 196608

    In addition, numerous variants are available for each of the main languages. Here is the full list of all variants supported by the command. To load a variant, pass its value directly in the dictionary parameter:
    DictionaryValue
    English (United Kingdom) 65536
    English Irish (Ireland) 65600
    English Australian (Australia) 65664
    English of New Zealand 65680
    English American (USA)65792
    English Canadian (Canada) 65920
    English South African (South Africa)66048
    English West Indian (Caribbean) 66176
    English Jamaican (Jamaica) 66192
    English (United Kingdom + America) 69632 (*)
    German standard (Germany, old spelling) 131072
    German of Luxembourg131073
    German of Austria131088
    German of Liechtenstein131089
    German of Switzerland (old spelling)131104
    German of South Tyrol131120
    German New spelling131328
    German of Switzerland New spelling131360
    German Old and New spelling131584 (*)
    German of Switzerland Old and New spelling131616
    Spanish standard (Spain)196608 (*)
    Spanish of Latin America standard196864
    Spanish Argentinean (Argentina)196865
    Spanish Bolivian (Bolivia)196866
    Spanish Chilean (Chile)196867
    Spanish Columbian (Columbia)196868
    Spanish Cuban (Cuba)196869
    Spanish Costa Rican (Costa Rica)196870
    Spanish Dominican (Dominican Rep.)196871
    Spanish Ecuadorian (Ecuador)196872
    Spanish Guatemalan (Guatemala)196873
    Spanish Honduran (Honduras)196874
    Spanish Mexican (Mexico)196875
    Spanish Nicaraguan (Nicaragua)196876
    Spanish Panamanian (Panama)196877
    Spanish Paraguayan (Paraguay)196878
    Spanish Peruvian (Peru)196879
    Spanish Puerto Rican (Puerto Rico)196880
    Spanish Salvadorian (El Salvador)196881
    Spanish Uruguayan (Uruguay)196882
    Spanish Venezuelan (Venezuela)196883
    Spanish Guinean (Equatorial Guinea)197121
    France, Monaco, Valle d’Aosta262144 (*)
    Canada262160
    Louisiana262161
    Belgium262176
    Luxembourg262177
    Switzerland262192
    Martinique, Guadeloupe, Haïti, Guyana262208
    Reunion, Seychelles, Comoro, Mauritius262224
    Tahiti, New Caledonia, Vanuatu, etc.262240
    Morocco, Algeria, Tunisia262256
    French African standard262272
    Benin262273
    Burkina Faso262274
    Burundi 262275
    Cameroon262276
    Central African Republics262277
    Congo (Brazzaville)262278
    Democratic Republic of Congo (ex-Zaire)262279
    Ivory Coast262280
    Djibouti262281
    Gabon262282
    Guinea262283
    Mauritania262284
    Niger262285
    Rwanda262286
    Senegal262287
    Chad262288
    Togo262289
    Bokmal Norwegian589824 (*)
    Nynorsk Norwegian590080
    Samnorsk Norwegian590336

    (*) standard dictionary that is installed when you use a constant.

    Note: The Norwegian dictionary is not present by default in 4D. Please contact 4D in order to obtain it free of charge. You must then install it in the Resources/Spellcheck folder.

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

 
PROPERTIES 

Product: 4D
Theme: Spell Checker
Number: 904

The OK variable is changed by the command

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Modified: 4D 2004.5
Modified: 4D v13
Renamed: 4D v13

 
SEE ALSO 

SPELL CHECKING
SPELL Get current dictionary
SPELL GET DICTIONARY LIST