Important: The information in this document is obsolete and should not be used for new development.
SRChangeLanguageObject
You can use theSRChangeLanguageObjectfunction to change the contents of a language object.
pascal OSErr SRChangeLanguageObject ( SRLanguageObject languageObject, const void *text, Size textLength);
languageObject- A language object.
text- The address of a buffer that contains the words or phrase to which the contents of the specified language object are to be changed.
textLength- The size, in bytes, of the specified text.
DESCRIPTION
TheSRChangeLanguageObjectfunction changes the contents of the language object specified by thelanguageObjectparameter to the data specified by thetextandtextLengthparameters.SRChangeLanguageObjectis a convenient shortcut for callingSREmptyLanguageObjectand thenSRAddText.
SRChangeLanguageObjectdoes not alter the value of the reference constant property of the language object specified by thelmObjectparameter.If there are no other references to the language object specified by the
languageObjectparameter, callingSRChangeLanguageObjectcauses that object to be released.SPECIAL CONSIDERATIONS
If you want to swap rapidly among several language models, you should use theSRSetLanguageObjectfunction instead ofSRChangeLanguageObject. Or, you could use thekSREnabledproperty to rapidly enable and disable parts of the current language model to reflect the current context.