google translator access via livecode
Paul Dupuis
paul at researchware.com
Mon Jun 5 08:21:31 EDT 2023
On 6/4/2023 2:35 PM, Andrew Meit via use-livecode wrote:
> I am seeking a widget or live script code to translate a single word or at most 256 chrs text from within a stack.
> I think there is or was Google api livecode could use to talk with the Google translator server via scripting.
> My ideal use: while moving the cursor over and clicking text the mousetext can be sent to Google and return the translation.
> Anyone have a sample stack to share?
> Thanks, Andrew
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
I poked around at this a little bit out of curiosity. The URL to
translate.google.com has parameters to perform the translation (in and
out language codes, word to translate). However, the resulting page
returned does not appear to contain the translated work, but instead
contains lots of javascript to fetch the translations (hard to tell),
but parsing teh returned page may be difficlt, if not impossible.
To use the Google Translate API's requires an account with Google Cloud
and there are charges. The first (large number) of words translated are
free, but at larger tiers, your are charged. Search for "Google
Translate API" for more details.
More information about the use-livecode
mailing list