Description Usage Arguments References Examples
The input is translated to a specified language with Google Translate.
For the translation of help document, the source document is derived from
RDocumentation. See language
for the available languages.
1 2 3 4 5 6 7 8 9 10 11 12 | translate(doc, to = "default", from = "auto", ...)
doc %to% to
## S3 method for class 'character'
translate(doc, to = "default", from = "auto", ...)
## S3 method for class 'help_files_with_topic'
translate(doc, to = "default", from = "auto", ...)
## S3 method for class 'transdoc_help'
translate(doc, to = "default", from = "auto", ...)
|
doc |
A character vector of text, a string of URL, or an object returned
by |
to |
|
from |
|
... |
Arguments passed to the methods. |
Google Translate https://translate.google.com/, RDocumentation https://www.rdocumentation.org/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Translate a text document
translate("This text will be translated", "ja")
"This text will be translated" %to% ja
# Translate a web document
translate("https://transdoc.atusy.net/")
"https://transdoc.atusy.net/" %to% ja
# Translate a help document
translate(help(str))
help(str) %to% ja
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.