Access Not Configured problem with language api

234 views
Skip to first unread message

pa...@cheffers.net

unread,
Nov 20, 2011, 9:13:56 AM11/20/11
to Google AJAX APIs
I have a javascript gadget running google language api v2 on
http://en.wikipedia.org. It is running fine.

When I move the gadget over to the Spanish or Portuguese wikipedia,
and enable access in the Google Api Console to

http://es.wikipedia.org
http://pt.wikipedia.org

I get a "Access Not Configured" message when I access the Google
language API V2 translation request.

I know the code works because it works on en.wikipedia.org.

I have checked for any hardcoded en.wikipedia.org strings already.

Jeremy Geerdes

unread,
Nov 20, 2011, 7:41:16 PM11/20/11
to google-ajax...@googlegroups.com
Perhaps I'm missing it, but I'm not seeing Language API v2 code on en.wikipedia.org. Could you provide a link to the page(s) where you're testing this stuff so we can see what's going on?

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

Thomas Vellaringattu

unread,
Nov 20, 2011, 7:48:22 PM11/20/11
to google-ajax...@googlegroups.com
I think there is a confusion between translation and tranliteration. 

My task is to make it easy for Indians and Asians to communicate on Android devices using their own languages.

thank you

Jeremy Geerdes

unread,
Nov 20, 2011, 7:56:03 PM11/20/11
to google-ajax...@googlegroups.com
I'm sorry, Thomas, but I think you're confusing the threads.


Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

For more information or a project quote:

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

Paul Cheffers

unread,
Nov 21, 2011, 1:32:09 AM11/21/11
to google-ajax...@googlegroups.com
Hi Jeremy,

The gadget code is at:

http://en.wikipedia.org/wiki/User:Endo999/GoogleTrans.js

There's quite a lot of code.

Sincerely,

Paul

Quoting Jeremy Geerdes <jrge...@gmail.com>:

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Jeremy Geerdes

unread,
Nov 21, 2011, 8:00:58 AM11/21/11
to google-ajax...@googlegroups.com
Okay. I see the code. And you're right. There's a lot of it. Do you have a page on which you're actually testing the code, whether it's working or not?

While you're looking for that, a few of thoughts:

1. Are you sure that the value given for SCGoogleAPIKeyV2 is a valid key which is activated in the APIs Console AND not restricted to a particular domain or URL? Despite what the code says about the key not being required (which, by the way, is the case with v1), v2 does require a valid key which is obtained through the APIs Console ( http://code.google.com/apis/console ). Although I don't know of a definitive reference to explain error messages from the API, the error that you're receiving would seem to suggest that this has not been done.

2. There is a v1 key present just above the v2 key. It looks like the code is using the v1 API for its Languages enum and perhaps individual word lookups. This is going to be problematic because the v1 API will be discontinued on 1 December. The comments in the code indicate that, because of the v1 key present in the code, the author expected an email notification if and when the API was discontinued. That is not the case. It will simply cease to work. You may want to consider using my Javascript wrapper for the v2 API to approximate the functionality of the v1 API. You can find it at http://code.google.com/p/gtranslate-api-v2-jsapi

3. It should also be noted that, on 1 December, the Translate API v2 will transition to a paid service. In order to continue using it after that time, you will need to have activated the API AND enabled billing through the API Console. Perhaps the author of the code disabled the key so as to avoid having to pay for others' use.

4. The individual word lookup facility would be problematic because machine translation (i.e., the service underlying Google's Translate API) generally struggles to translate strings of only one or two words. In my testing, it only becomes even remotely reliable with at least three words.

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!

Paul Cheffers

unread,
Nov 24, 2011, 1:27:14 AM11/24/11
to google-ajax...@googlegroups.com
Hi Jeremy,

I fixed my problem up by simply creating another browser language api
v2 key and associating it with a referral pattern

*.wikipedia.org/*

And then I was able to have the software gadget work on all wikipedias.

The editing of referrals per browser key does not seem to work after a while.

Regards,

Paul


Quoting Jeremy Geerdes <jrge...@gmail.com>:

----------------------------------------------------------------

Reply all
Reply to author
Forward
0 new messages