Description Usage Arguments Value Note Examples
View source: R/translate_manuscript.R
Translate Mansucript File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | translate_manuscript(
file,
target = "es",
chunk = TRUE,
fix_header = TRUE,
verbose = TRUE,
...
)
translate_script(
file,
target = "es",
chunk = TRUE,
fix_header = FALSE,
verbose = TRUE,
...
)
chunk_google_translate(
file,
chunk = TRUE,
target = "es",
fix_header = TRUE,
...
)
gl_detect_file(file, max_nchar = 2000)
check_manuscript_backticks(file)
|
file |
Manuscript markdown file |
target |
target language, see |
chunk |
Should the calls to Google Translate be chunked? |
fix_header |
should the header information be fixed, such as ' course-completeness: 100 '. |
verbose |
Print diagnostic messages |
... |
additional arguments to pass to
|
max_nchar |
number of characters to use for detection. |
A 'data.frame' of the text and translated text
The following changes of the translated text are attempted: Change '] (' without spaces for links Keep links to be the link from original text Replace asterisks and underscores for bolding Keep back-ticked code as is
1 2 3 4 5 6 7 8 9 | auth_file = "~/Dropbox/Projects/cbds_translate/RClass-Translator.json"
if (file.exists(auth_file)) {
googleLanguageR::gl_auth(auth_file)
target = "es"
verbose = TRUE
chunk = TRUE
file = system.file("extdata", "00_template.md", package = "didactr")
df = translate_manuscript(file)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.