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.
How phone makers cured my upgrade addiction
35 minutes ago
You mean like:
ReplyDeletehttp://www.steeleweed.com/computer.html
translation didn't work for me:(
ReplyDelete@Anonymous:
ReplyDeleteI changed the sample text because Google returned an error message: "the string to be translated exceeds the maximum length allowed".
Apparently, there is a restriction on how long text strings can be -- it's 500 characters.
ReplyDeletehttp://code.google.com/p/jquery-translate/
ReplyDeleteNo limits with this!
thanks for the information, i used google translate, it was a great tools.
ReplyDeleteCan you use this API in any web based application?
ReplyDeleteNeeds a C api...
ReplyDeleteThe 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.
ReplyDeleteI 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.
ReplyDeleteplease php api
ReplyDeleteYes I am need to connection and get data code. FOr example php code. This is AJAX and search engine doesn't reading in it.
ReplyDeleteNeed an API for Indian languages in which google home page can be viewed, like Bengali,Telugu,Marathi,Tamil,Gujarati,Kannada,Malayalam,Punjabi. Please help.
ReplyDeleteI 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.
ReplyDeleteThe 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.
ReplyDeleteCool :-)
ReplyDeleteHow can we use this with PHP ?
ReplyDeleteThanks Phil for mentioning the jquery translate plugin.
ReplyDeleteYet another good free service from Google.
ReplyDeleteI wish I could use API with SOAP, so developer like me can develop grate translating applications.
Yet another good free service from Google.
ReplyDeleteI wish Google develop API with SOAP, so that many kinds of translating applications can be developed.
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.
ReplyDeleteYou 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.
ReplyDeleteIts a cool stuff though but i when i translate from english to french, i always get ' instead of an ', i dont know what the problem is pls help.
ReplyDeletePHP / SOAP please!!! :-)))
ReplyDeletegoogle api and the translation really great thanks
ReplyDeletecan you people provide a API for multiple texts in Ajax. Means Request contains array of texts and response containd priticular language translated array texts.
ReplyDeletewill 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?
ReplyDeleteI 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!
ReplyDeletePHP API is available here:
ReplyDeletehttp://www.codediesel.com/php/google-translation-php-wrapper/
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.
ReplyDeletehello,
ReplyDeletei 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??
And now it's gone. :(
ReplyDeletehttp://googlecode.blogspot.com/2011/05/spring-cleaning-for-some-of-our-apis.html
Guys, use this Web method for GOOGLE TRASLATOR.
ReplyDelete[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;
}
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..!!
ReplyDeleteplease show your code.
ReplyDeleteYou'll get an error if you try to translate text.
ReplyDeleteError: Please use Translate v2. See http://code.google.com/apis/language/translate/overview.html