Translation module

I have AF configured through Bing to do translations. I noticed it only translates the first 5k of a text document. Why is this and could it be expanded?

5k was chosen as a limit for a couple reasons.

  • The size limit for each chunk of translated text in a request was 5k. So by making it only do the first 5k we eliminated the need to split the text into 5k chunks and reassemble multiple requests. This would have likely involved parsing the text and figuring out safe places to split it.
  • There were some concerns that since we are not storing the translated text there could be some memory issues with large documents.
  • There were concerns that since we translate text automatically when a document is viewed in the Translated text document viewer that this would cause much more text to be sent Bing for translation than a user was expecting when large documents were selected, especially if they were selected repeatedly, and cause the user to be billed more than they would be happy about by the Bing translation service.

So in short it could be expanded. But with our initial implementation we went with what we hoped would cause the fewest issues.