Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 7 - Translation Manager / Translation Extension Reference


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, and kTranslateTranslateFile request codes. In response to these request codes, you typically dispatch to one of the extension-defined routines DoGetFileTranslationList, DoIdentifyFile, and DoTranslateFile. To construct a translation extension that translates scraps, you need to create a component that responds to the kTranslateGetScrapTranslationList, kTranslateIdentifyScrap, and kTranslateTranslateScrap request codes. In response to these request codes, you typically dispatch to one of the extension-defined routines DoGetScrapTranslationList, DoIdentifyScrap, and DoTranslateScrap.

All routines return result codes. If they succeed, they should return noErr. The Component Manager requires these routines to return a value of type ComponentResult--a value of type LongInt--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

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996