将HTML内容拆分为可翻译的块[重复]

This question already has an answer here:

I am using the Google translate API to content, there are cases where the length of this content exceeds the limit Google imposes on the API calls.

Any one know the best way to split the content so that multiple requests could be used instead?
I'm concious that I don't want to break the html or the content in a way that makes it untranslatable.

</div>

Well one of the solutions could be just splitting the content with JavaScript split function on "." or "!" or "?" or any other char that could end a sentence (content.split(".");) Check that its length is less than API's limit and pass it to API sentence by sentence. This way you will not going to loose a context.