View source: R/translate-document.R
gl_translate_document | R Documentation |
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"
)
d_path |
Path to the document to be translated |
target |
Target language code (default "es-ES") |
output_path |
Path where to save the translated document (default "out.pdf") |
format |
Document format. Currently, only "pdf" is supported |
source |
Source language code (default "en-UK") |
model |
Translation model to use ("nmt" or "base") |
location |
Location for translation API (default "global") |
The full path of the translated document
Other translations:
gl_translate()
,
gl_translate_detect()
,
gl_translate_languages()
## Not run:
gl_translate_document(
system.file(package = "googleLanguageR", "test-doc.pdf"),
target = "no"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.