ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
  • Operating mode of spelling checker in a Word Processing control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Indicates and loads the dictionary corresponding to a given language.
Remarks:
  • The dictionary must be a spelling dictionary in Hunspell format.
  • The French and English/American dictionaries are loaded by default.
  • In this version, these dictionaries are used:
    • by the Word Processing control.
    • by the edit control.
    • by the Text columns of Table controls.
Example
// Load the French dictionary
DictionaryLoad("Dictionary_fr.dic", languageFrench, 0)
DictionaryLoad("Dictionary_fr.dic", "fr-fr")
 
// Load the French Canadian dictionary
DictionaryLoad("Dictionary_fr.dic", "fr-ca")
DictionaryLoad("Dictionary_fr-ca.dic", languageFrench, 3)
// 3 corresponds to the sub-language of Canada
Syntax

Loading a dictionary and associating it with a language via a constant Hide the details

<Result> = DictionaryLoad(<Dictionary> , <Language> [, <Sub-language>])
<Result>: Boolean
  • True if the dictionary was loaded,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Dictionary>: Character string
Path of dictionary file to load (".dic" file). A ".aff" file with the same name must be found at the same location. These files must correspond to Hunspell dictionary files.
<Language>: Integer constant
Language for which the dictionary will be used:
languageAfrikaansAfrikaans
languageAlbanianAlbanian
languageArabicArabic
languageArmenianArmenian
languageBelarusianBelorussian
languageBengaliBengali
languageBulgarianBulgarian
languageCatalanCatalan
languageChineseChinese
languageCroatianCroatian
languageCzechCzech
languageDanishDanish
languageDutchDutch
languageEnglishEnglish
languageEstonianEstonian
languageFinnishFinnish
languageFrenchFrench
languageGeorgianGeorgian
languageGermanGerman
languageGreekGreek
languageHebrewHebrew
languageHindiHindi
languageHungarianHungarian
languageIcelandicIcelandic
languageIndonesianIndonesian
languageItalianItalian
languageJapaneseJapanese
languageKoreanKorean
languageLatvianLatvian
languageLithuanianLithuanian
languageMacedonianMacedonian
languageNorwegianNorwegian
languagePolishPolish
languagePortuguesePortuguese
languagePunjabiPunjabi
languageRomanianRomanian
languageRussianRussian
languageSerbianSerbian
languageSindhiSindhi
languageSlovakSlovakian
languageSlovenianSlovenian
languageSpanishSpanish
languageSwedishSwedish
languageThaiThai
languageTurkishTurkish
languageUkrainianUkrainian
languageUzbekUzbek
languageVietnameseVietnamese
<Sub-language>: Optional integer
Sub-language for which the dictionary is defined. For more details, see Correspondence between languages, sub-languages, character sets and nations. If this parameter is not specified, the default sub-language associated with the language is used.

Loading a dictionary and associating it with a language (via the language name) Hide the details

<Result> = DictionaryLoad(<Dictionary> , <Language>)
<Result>: Boolean
  • True if the dictionary was loaded,
  • False otherwise. To get more details on the error, use ErrorInfo with the errMessage constant.
<Dictionary>: Character string
Path of dictionary file to load (".dic" file). A ".aff" file with the same name must be found at the same location. These files must correspond to Hunspell dictionary files.
<Language>: Character string
Language and sub-language for which the dictionary will be used (for example : "fr-fr").
Remarks

Operating mode of spelling checker in a Word Processing control

  • A docx document contains information about the document language. This information is used to identify the dictionary language that will be used.
  • If the dictionary corresponding to the document language is placed beside the executable, it is automatically loaded and used to correct the document. If the dictionary corresponding to the document language is not found, the spell check is not available.
  • When creating a docx document via the Word Processing control, the document language corresponds to the current application language (defined by Nation for example).
  • The CheckSpell property is used to enable or disable the spelling checker in a Word Processing control.
Component: wd300std.dll
Minimum version required
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/16/2024

Send a report | Local help