Página 1 de 3

Google Translate API

Publicado: 23 Jul 2011 13:51
por minou
The Google Translate API has been officially deprecated an alternative is the Microsoft Translator V2, check this article for more details.



In this post i will show you how work with the Google Translate API V2 (Labs), this API lets you automatically translates text from one language to another.

Disclaimer

This version of the Google Translate API is in Labs, and its features might change unexpectedly until it graduates.
The Google Translate API requires the use of an API key, which you can get from the Google APIs console
Before to use this API check the Google Translate API Terms of Use.

To use the Google Translate API you must send a HTTP GET request to its URI.

The URI for a request has the following format:

Código: Seleccionar todo

https://www.googleapis.com/language/translate/v2?parameters
Example to making a request to translate the Hello World text from English (en) to Spanish (es) the URI must be constructed in this way

Código: Seleccionar todo

https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&source=en&target=es&q=Hello%20world
The response in JSON format will be

Código: Seleccionar todo

{"data":{"translations":[{"translatedText":"Hola Mundo"}]}}
To activate the auto-detection of the source language you must avoid the use of the source keyword

Código: Seleccionar todo

https://www.googleapis.com/language/translate/v2?key=INSERT-YOUR-KEY&target=es&q=Hello%20world
and the JSON response in this case will be

Código: Seleccionar todo

{"data":{"translations":[{"translatedText":"Hola a todos","detectedSourceLanguage":"en"}]}
crdt : Rodrigo

result :

Imagen

Código: Seleccionar todo

id = HTTP.SubmitSecure("https://www.googleapis.com/language/translate/v2",...
http://code.google.com/intl/en/apis/lan ... _rest.html

:friends:

Re: Google Translate API

Publicado: 23 Jul 2011 14:25
por rafaxplayer
  Thank you, you can upload apz example?  

Re: Google Translate API

Publicado: 23 Jul 2011 14:54
por minou
rafaxplayer escribió:  Thank you, you can upload apz example?  
yes wy not :yes:

Re: Google Translate API

Publicado: 23 Jul 2011 15:05
por minou
dont forget change key
HIDE: ON
Hidebb Message Hidden Description

code source :
HIDE: ON
Hidebb Message Hidden Description

Re: Google Translate API

Publicado: 23 Jul 2011 15:33
por Ceone
hace tiempo vi algo de esto gracias...

Re: Google Translate API

Publicado: 23 Jul 2011 18:48
por r34k
thank's :D!

Re: Google Translate API

Publicado: 23 Jul 2011 19:10
por Pabloko
as you said (copy from jquery translate plugin) google translate sdk will be publicly unavalible under sept of this year, this is due the huge amount of traffic generated.

The ms translate api will be the only usabe service right now, but google works better, for example, ms translates broken ("averiado") as "lost the virginity", a fucking bad translation...

Re: Google Translate API

Publicado: 24 Jul 2011 22:58
por Thedary
Y como se utiliza?

Re: Google Translate API

Publicado: 25 Jul 2011 06:46
por nghethihieu
thanks :)).

Re: Google Translate API

Publicado: 27 Jul 2011 02:52
por spiderman
thanx

Re: Google Translate API

Publicado: 02 Ago 2011 04:56
por gruposasp
thanks

Re: Google Translate API

Publicado: 07 Ago 2011 20:24
por kocx520
thanks !!

Re: Google Translate API

Publicado: 08 Ago 2011 12:09
por er_mejor
gracias!! muy bueno

Re: Google Translate API

Publicado: 22 Ago 2011 12:36
por dangngocnguyenit
thanks

Re: Google Translate API

Publicado: 23 Ago 2011 14:04
por abood1987
thank you

Re: Google Translate API

Publicado: 28 Ago 2011 02:24
por xxxpunisherxxx
gracias sta bonito el Traslator

Re: Google Translate API

Publicado: 30 Ago 2011 11:13
por Bomberman
thanks

Re: Google Translate API

Publicado: 05 Sep 2011 19:55
por bumbo
gracias

Re: Google Translate API

Publicado: 15 Sep 2011 03:33
por Phaelitico
i will test

Re: Google Translate API

Publicado: 09 Oct 2011 23:33
por j2a2foros
gracias... muy bueno,..