Question on machine translation widget

A place for users and developers of the Xataface to discuss and receive support.

Question on machine translation widget

Postby jonbfl » Sun Sep 18, 2011 12:50 pm

I've got one of my test applications to the point where I have 'Basque/Euskara' (_eu) working - (its a kludge)
I used the Spanish language file copied & renamed to eu.ini, added the _eu tables where needed for translated fields in tables. Works as I intended. Spanish prompts (for now) and the ability to store the translated fields in Basque.

That's all good, and I am way happy. BUT - there's an odd thing. I grokked that Xataface machine translate (despite the fishy icon) uses the Google translate API in some form (I hear its going to be a paid service soon). Here's the odd thing - if I test using the machine translate and the target language is Basque - I get an error - "Invalid Language Translation Pair" I think its a passed back error (what do I know? LOL) . Maybe its the version of the API Xataface is using???

This is PURELY a 'what's up' question - We were never planning on using machine translation (although Google translate has made huge strides in the last two years). The project leader and I discussed it, and his opinion was - "you know, maybe its a good starting point though".

The Google docs say the API works for any supported languages in Google Translate....
http://code.google.com/apis/language/tr ... rview.html

Thanks very much...
8)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: Question on machine translation widget

Postby shannah » Mon Sep 19, 2011 9:04 pm

hmm... good question. I set up that google translate option a long time ago so it is possible that basque isn't supported in the version of API that it uses. (not likely though). It uses the Javascript API so if you have firebug or safari you can easily monitor the HTTP requests and responses to see what's going on there.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Question on machine translation widget

Postby jonbfl » Thu Oct 20, 2011 6:05 am

This refers to the QueryTranslator's Google Machine Translation feature.

A followup of a few things I have learned -

First - the Google Translate APIv1, which Xataface uses, is deprecated. In fact it is due to go-offline Dec 1 2011. They have discussed having a 'paid' version, and it apparently has an attribute for an API key already present & active. Those 'discussions' have not borne fruit so far.

There is a translate APIv2 which IS a paid service, but of course that would require a code massage to make it work.
http://code.google.com/apis/language/tr ... icing.html

Second - This refers to the APIv1 as in Xataface presently - its quite unclear in their docs what works and doesn't.

If you read their docs and pronouncements, you could easily infer that the API works with any language pair that will work with Google Translate. Umm, NOT SO.

They have a languages.enum that lets you enumerate language codes. Its keyed to a valuelist that works for GoogleTranslate. So it will return true for most languages. BUT if you read down into the docs you will find the 'real' supported languages list, which is much shorter. Just search down to this:

"List of translatable languages
The following list provides all of the translatable languages and language codes supported by the API."

Xataface will work correctly even if a Language Pair is not translatable, you'll get an error returned of "invalid translation language pair" and, you'll need to use a different method for translation.

reference:
http://code.google.com/apis/language/tr ... anslatable

Good Luck
8)
jonbfl
 
Posts: 66
Joined: Thu Jul 28, 2011 8:20 pm

Re: Question on machine translation widget

Postby shannah » Thu Oct 20, 2011 9:34 am

Thanks for posting this. Yes. The google translation api will be shut down at the end of the year. Modifying Xataface to use v2 of the api won't be difficult but it would be a paid service (you'd need to enter your Google API key in config somewhere).
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved