I'm going to give you two ways of handling this, one based on making
API calls, and the other using the Google Translator Toolkit.

The specifics of how to translate using the API depend largely on what
programming language you're using. In basic, you have to take your
document, parse it into segments of no more than 5000 characters each,
and then send it to the API. Once you get it back, combine the
segments back together again and there you have your translated
document.

For an example of how to send and receive a translation API request
via JavaScript, go to the documentation here:
http://code.google.com/apis/ajaxlanguage/documentation/#Translate

If you want to do this using another programming language, research
how to handle JSON requests via that language. JSON, or JavaScript
Object Notation, is the medium Google uses to process and return API
requests, and knowing how to handle JSON in your programming language
will allow you to make API requests to Google programmatically.

You may also try doing a search online to see what others have done.
For example, if you're using PHP as your programming language, do a
search online for "Google Translate PHP". This will help you to find
classes and functions that others have already made and released to
the public, which will keep you from having to 'reinvent the wheel'.

If you want to translate whole documents, and need to keep formatting
especially, you may want to use Google's Translator Toolkit (http://
translate.google.com/toolkit/). While not currently accessible via
API, and still a little buggy (it's in Beta), it will allow you to
translate whole documents quickly and easily.

Good luck,
  Andrew S.
  www.KingdomTranslate.com

--

You received this message because you are subscribed to the Google Groups 
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-ajax-search-api?hl=.


Reply via email to