TrText_CheckSpelling | 
Returns the start position and length of the first word which is spelled incorrectly in the text.
Syntax
TrText_CheckSpelling ( switches ; text { ; languageID } )
Parameters
| switches | not used, reserved for future use. Leave blank or put "-Unused" | 
| text | the text to check | 
| languageID | (optional) which language to use for the spell check | 
Returned Result
Data type returned
Text
Result
Returns the start position and length of the first word which is spelled incorrectly in the text.
Originated in
Troi Text Plug-in 4.0
Compatibility
FileMaker Pro 17 to FileMaker Pro 21 (2024)
Considerations
Note that the spelling functions are available for Windows 8 and later (and all Mac OS versions).
Example
TrText_CheckSpelling ( "-Unused" ; "a great colour" ; "en-US" ) ]
will result in “9 6”, as “colour” is the first misspelled US English word.
Example 2
Let’s assume you have these 2 fields:
TheText 	text field, contains for example "een mooie voorsteling."
LanguageID	text field, contains for example "nl-NL" for Dutch
In a script you can now get the first word which is spelled incorrectly:
Set Variable [ $Spelling_FirstError ; TrText_CheckSpelling ( "-Unused" ; TheText ; LanguageID ) ]
If [ $Spelling_FirstError <> "" ]
	Set Variable [ $Spelling_FirstErrorWord ; 
			Let ( [ spellingStart = LeftWords ( $Spelling_FirstError ; 1 ) ;
			spellingLength = RightWords ( $Spelling_FirstError ; 1) ] ;
			Middle ( TheText ; spellingStart ; spellingLength ) )
			]
Related functions
| TrText_GetSpellingLanguages | 
| TrText_LearnSpelling | 
| TrText_SetSpellingIgnoreList | 
| TrText_UnlearnSpelling | 
Related topics
Troi Text Plug-in online help (overview)