Jump to content

Help with Google Language API / JS Arrays


binarylime

Recommended Posts

Hi, as you may or may not be aware, the Google language API has a 500 character limit. This is no good when attempting to translate an entire page.

 

I have written some code to split() the page text into sentences, stored in an array. Each sentence from the array is then in turn sent to the Google API for translation before being printed to the screen.

 

All seems well, except the order in which the translated text appears on screen is not the order in which they were stored in the array!

 

Not sure whats going on. See http://development.asclarke.com/translate2.html

 

Any help appreciated.

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/108003-help-with-google-language-api-js-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.