API key issue

94 views
Skip to first unread message

riz4uall

unread,
Dec 2, 2011, 1:57:07 AM12/2/11
to Google AJAX APIs
i m using google ajax translation.
my code read like below

google.language.translate("hello world", primaryLang, secondaryLang,
function(result) {
if (!result.error) {
v.value = result.translation;

v.onchange();
}
//alert(result.translation)
});

it does not give me translated result.


the API key i have generated always show Courtesy limit: 0 characters/
day .. do i have to make payment before i can use the key???

Jeremy Geerdes

unread,
Dec 2, 2011, 7:52:43 AM12/2/11
to google-ajax...@googlegroups.com
A couple of issues that could be happening. Unless you're using the gtranslate-api-v2-jsapi project, the syntax you're using would appear to be for the Translate API v1. The v1 API has been discontinued as of yesterday (i.e., 1 December 2011), so it will not return results. You will need to migrate to the Translate API v2. Since Google does not provide a JS wrapper for the v2 API, you will need to either write your own wrapper or utilize the aforementioned gtranslate-api-v2-jsapi project. You can find information for doing so - and the code necessary - at the link below:

http://code.google.com/p/gtranslate-api-v2-jsapi

In addition, as of yesterday (i.e., 1 December 2011), the v2 API has become a paid service. In other words, there will no longer be a courtesy limit; you will have to enable billing to continue utilizing the service.

If you would prefer to not enable billing and pay for the service, you may try the Bing Translator API. It's not as good, qualitatively, as the Google API, but it is still free.

Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:
jrge...@gmail.com

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

> --
> You received this message because you are subscribed to the Google
> Groups "Google AJAX APIs" group.
> To post to this group, send email to
> google-ajax...@googlegroups.com
> To unsubscribe from this group, send email to
> google-ajax-searc...@googlegroups.com
> To view this message on the web, visit
> http://groups.google.com/group/google-ajax-search-api?hl=en_US
> For more options, visit this group at
> http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

CARIDAD TOVAR

unread,
Dec 2, 2011, 11:06:45 AM12/2/11
to google-ajax...@googlegroups.com
Gracias,disculpa las molestias y los errores.No se repetirán

2011/12/2 Jeremy Geerdes <jrge...@gmail.com>
Reply all
Reply to author
Forward
0 new messages