An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

March 20, 2008

Google Translate API

Google launched another AJAX API, this time for language detection and translation. The API works for the same language pairs that are available at Google Translate and lets you display the translation of a text inside your own page, without having to link to an external translation service.

The translation API could be used to automatically translate some content from a web page using the browser's preferred language, to create a Greasemonkey script that translates to English the posts written in other languages, to detect if a comment is written in English before posting it and for many other things.

Here's one example of use, where you can enter a text in one of the supported languages (Arabic, Chinese, French, German, Greek, Dutch, Italian, Japanese, Korean, Portuguese, Russian, Spanish), Google automatically detects the language and it shows the English translation. The sample text is from Le Monde.






Posted by at

36 comments:

  1. You mean like:

    http://www.steeleweed.com/computer.html

    Reply Delete
  2. translation didn't work for me:(

    Reply Delete
  3. @Anonymous:
    I changed the sample text because Google returned an error message: "the string to be translated exceeds the maximum length allowed".

    Reply Delete
  4. Apparently, there is a restriction on how long text strings can be -- it's 500 characters.

    Reply Delete
  5. http://code.google.com/p/jquery-translate/
    No limits with this!

    Reply Delete
  6. thanks for the information, i used google translate, it was a great tools.

    Reply Delete
  7. Can you use this API in any web based application?

    Reply Delete
  8. Needs a C api...

    Reply Delete
  9. The Google translations are excellent. Try comparing to Yahoo! which uses the SysTran product. SysTran really needs to get out of the machine-driven translation business, because they cannot translate something as simple or as common as "c'est" or "l'un de" or anything with an apostrophe. If you get past the failure to handle simple apostrophes, the rest truly a joke. It's as if they found the worst programmers in the world and paired them up with functionally illiterate linguists. How in God's name does a company whose reason for being is translation botch things so badly? They're an embarrassment.

    Reply Delete
  10. I have developed Online Translation Service http://translator.vndv.com/ page which uses Google AJAX Language API. I also used Google AJAX Language API to translate the user interface of Online Translation Service to the following languages: English, Arabic, Bulgarian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hindi, Italian, Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Spanish, Swedish.

    Reply Delete
  11. Yes I am need to connection and get data code. FOr example php code. This is AJAX and search engine doesn't reading in it.

    Reply Delete
  12. Need an API for Indian languages in which google home page can be viewed, like Bengali,Telugu,Marathi,Tamil,Gujarati,Kannada,Malayalam,Punjabi. Please help.

    Reply Delete
  13. I am searching for a custom implementation of google translation, google cache or any other service of google to achieve results similar to that of an anonymous proxy server.

    Reply Delete
  14. The translation API could be used to automatically translate some content from a web page using the browser's preferred language, to create a Greasemonkey script that translates to English the posts written in other languages, to detect if a comment is written in English before posting it and for many other things.

    Reply Delete
  15. How can we use this with PHP ?

    Reply Delete
  16. Thanks Phil for mentioning the jquery translate plugin.

    Reply Delete
  17. Yet another good free service from Google.
    I wish I could use API with SOAP, so developer like me can develop grate translating applications.

    Reply Delete
  18. Yet another good free service from Google.
    I wish Google develop API with SOAP, so that many kinds of translating applications can be developed.

    Reply Delete
  19. Nice toolset, but i have one problem (i know it's caused by google, but still) How many of you tried to translate from english to german, and then to french.

    Reply Delete
  20. You should never ever use as an input machine translation. It's a very bad idea because the translation is likely that include many mistakes. Translate from English directly to French.

    Reply Delete
  21. Its a cool stuff though but i when i translate from english to french, i always get &#39 instead of an ', i dont know what the problem is pls help.

    Reply Delete
  22. PHP / SOAP please!!! :-)))

    Reply Delete
  23. google api and the translation really great thanks

    Reply Delete
  24. can you people provide a API for multiple texts in Ajax. Means Request contains array of texts and response containd priticular language translated array texts.

    Reply Delete
  25. will this work if i need to develop an iphone app? And can the iphone app then work in a place where there is no 3G or wireless internet coverage?

    Reply Delete
  26. I love it. I used this on my website www.reactiq.com. Depending on the browser language, I automatically translate all the text to the browser language. It's weird because when I go to my own website, I can do so using any language - not understanding it at all!

    Reply Delete
  27. PHP API is available here:

    http://www.codediesel.com/php/google-translation-php-wrapper/

    Reply Delete
  28. Google translate may be one of the best translation tools on the web but it's still very poor and should not be relied upon for an accurate translation. If you don't speak the second language you want to translate to it's too easy to be impressed with the results but to a native speaker the results are often comical. If you're a student studying a second language don't even think about using a translation tool to hand in work as your own. It will be all too obvious that it's not. One day these tools will provide excellent translations but there's a way to go yet.

    Reply Delete
  29. hello,
    i many number of documents(about 10000) to convert into English. do i have to copy my text from every document and paste it and note the translated text.
    Can anyone suggest me how to do this.. an eaiser way??

    Reply Delete
  30. And now it's gone. :(
    http://googlecode.blogspot.com/2011/05/spring-cleaning-for-some-of-our-apis.html

    Reply Delete
  31. Guys, use this Web method for GOOGLE TRASLATOR.

    [WebMethod]
    public XmlDocument LanaguageTransformation(string language)
    {
    Uri uri = new Uri("https://www.googleapis.com/language/translate/v2?key=AIzaSyAASWPPmEze624Rw5DtAFHHNWA2M4en8eM&q=" + language + "&source=en&target=fr&callback=handleResponse&prettyprint=true&format=text");
    HttpWebRequest requst = HttpWebRequest.Create(uri) as HttpWebRequest;
    requst.Method = WebRequestMethods.Http.Get;
    HttpWebResponse response = requst.GetResponse() as HttpWebResponse;
    StreamReader reader = new StreamReader(response.GetResponseStream());

    string tmp = reader.ReadToEnd();
    StringBuilder strtemp = new StringBuilder();
    string[] str = tmp.Split('"');
    strtemp.Append("");
    strtemp.Append("");
    strtemp.Append("" + str[7] + "");
    strtemp.Append("");
    XmlDocument xdoc = new XmlDocument();
    xdoc.LoadXml(strtemp.ToString());
    return xdoc;
    }

    Reply Delete
  32. hi guys.. plz tell me the php code to use Google Translator API...in my php application to convert the hindi language into english and detects the source language too...thanx..!!

    Reply Delete
  33. You'll get an error if you try to translate text.
    Error: Please use Translate v2. See http://code.google.com/apis/language/translate/overview.html

    Reply Delete

Note: Only a member of this blog may post a comment.

[フレーム]

Subscribe to: Post Comments (Atom)
 

AltStyle によって変換されたページ (->オリジナル) /