home *** CD-ROM | disk | FTP | other *** search
- 5 TRANSLATOR LIBRARY
-
-
- 5.1 OPEN THE TRANSLATOR LIBRARY
-
- The Translator Library must have been opened before you may use
- the functions (well, there is only one) listed in this file.
-
- /* Declare a pointer to the Translator Library: */
- struct Library *TranslatorBase;
-
- /* Open the Translator Library: */
- TranslatorBase = (struct Library *)
- OpenLibrary( "translator.library", 0 );
-
- if( !TranslatorBase )
- exit(); /* Could NOT open the Translator Library! */
-
-
- /* ... */
-
-
- /* Close the Translator Library: */
- CloseLibrary( TranslatorBase );
-
-
-
- 5.2 FUNCTIONS
-
- Translate()
-
- This function will translate a string into a phonetical
- string that can be read by the Narrator Device. This
- function will work best with English sentences, but can be
- used for many other languages if you afterwards do some small
- changes of the phonetic text.
-
- Synopsis: char_left = Translate( in, in_len, out, out_len );
-
- char_left: (long) If not all phonetic text could fit in the
- out string the function will automatically only
- translate the words which will fit. (It will not
- stop in the middle of a word.) If all words could
- be translated zero is returned, else a negative
- value is returned. This value tells us how many
- letters of the "in" string have been translated.
- With this value we can then call the function
- again and translate the remaining text.
-
- Note that the number is negative.
-
- in: (char *) Pointer to the (English) text string
- which should be read.
-
- in_len: (long) The length of the (English) text string.
-
- out: (char *) Pointer to a string where the phonetic
- text string will be stored. (The "in" string is
- converted and copied to the "out" string.)
-
- out_len: (long) The length of the phonetic (out) string.
-
-