0

I've already achieve to translate, with Google API translate, some plain text from a textarea or from a .txt file but nothing from a word doc (by word doc i mean .doc/.docx files). I only have an unreadable content when i get my doc content in java (i have an ajax call who get the file content which it filled by the user into an input file).

Do i have to transform my word doc content to plain text before calling the API or maybe Google have a simply way to translate a word doc through their API ?

I hope i'm clear enough..

Sillorn
  • 23
  • 4

1 Answers1

0

As far as I know, you can send plain text and HTML file to the Translation API as mentioned in the documentation. You can also take a look in the Query parameters of API's translate method that states the format parameter should be plain text or HTML. In your case, I think you should have to extract the text from the document as plain text before you send it to the Translation API.

enle lin
  • 1,664
  • 8
  • 14