powered by
Translate a document via the Google Translate API
gl_translate_document( d_path, target = "es-ES", output_path = "out.pdf", format = c("pdf"), source = "en-UK", model = c("nmt", "base"), location = "global" )
The full path of the translated document
Path to the document to be translated
Target language code (default "es-ES")
Path where to save the translated document (default "out.pdf")
Document format. Currently, only "pdf" is supported
Source language code (default "en-UK")
Translation model to use ("nmt" or "base")
Location for translation API (default "global")
Other translations: gl_translate(), gl_translate_detect(), gl_translate_languages()
gl_translate()
gl_translate_detect()
gl_translate_languages()
if (FALSE) { gl_translate_document( system.file(package = "googleLanguageR", "test-doc.pdf"), target = "no" ) }
Run the code above in your browser using DataLab