Important: The information in this document is obsolete and should not be used for new development.
Translation Extension-Defined Routines
This section describes the routines you'll need to define in order to write a translation extension. You can create both file and scrap translation extensions.To construct a translation extension to translate files, you need to create a component that responds to the
kTranslateGetFileTranslationList
,kTranslateIdentifyFile
, andkTranslateTranslateFile
request codes. In response to these request codes, you typically dispatch to one of the extension-defined routinesDoGetFileTranslationList
,DoIdentifyFile
, andDoTranslateFile
. To construct a translation extension that translates scraps, you need to create a component that responds to thekTranslateGetScrapTranslationList
,kTranslateIdentifyScrap
, andkTranslateTranslateScrap
request codes. In response to these request codes, you typically dispatch to one of the extension-defined routinesDoGetScrapTranslationList
,DoIdentifyScrap
, andDoTranslateScrap
.All routines return result codes. If they succeed, they should return
noErr
. The Component Manager requires these routines to return a value of typeComponentResult
--a value of typeLongInt
--to simplify dispatching.See "Dispatching to Translation Extension-Defined Routines" beginning on page 7-24 for a description of how you call these routines from within a translation extension.
Subtopics
- File Translation Extension Routines
- Scrap Translation Extension Routines