
When the document is displayed, on the top center of the page, click Open in Google Docs. If it’s on the computer, click on Upload and select the file. If the file is in Google Drive, click on My Drive and find the file you want to open. Just like the PDF documents, you’ll also need to upload the Word document to Google Docs for you to translate it. You can now translate the document to any language you’d like.Īlso read: How To Insert PDF Into Google Docs Translating Word Documents in Google Docs The PDF file will now be in Google Docs format. When the preview of the document is displayed, on the top center of the page, click Open in Google Docs.

Once it’s uploaded, a preview of the document will appear. You can just drag the file or you can select the file from your computer. If it’s on the computer, click on Upload and add the PDF document.

A pop-up window will appear on your screen. Click on File at the top of the screen and select Open. Var doc = DocumentApp.openById(targetDoc.getId()) įor (var i = 0 i already translated this fileįor (var i = 0 i < languages.For this to work, you need first to upload your PDF document to Google Docs. open copied Doc and start looping through the content Var targetDoc = sourceDoc.makeCopy(targetTitle, DriveApp.getFolderById(sourceFolderId)) create a copy in the same folder and indicate the language in the title Var sourceFolderId = sourceDoc.getParents().next().getId() Var sourceDoc = DriveApp.getFileById(sourceDocId)

This is my code: function TranslateFunction() /) I've tried LanguageApp.Translate() but this syntax only returns an unformatted string and removes all the table borders (purely string). I'm trying to imitate the "Translate Document" tool in Google Docs by writing a Google (Apps) Script that can automatically translate a series of documents.
