knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)
library(transdoc)

transdoc

R build status

Translate text, web, and help documents with Google Translate

Installation

remotes::install_github("atusy/transdoc")

Examples

Translate a help document

The replaced ? launches your browser and shows a translated help.

library(transdoc)
options(transdoc_to = "ja")
?c

Translate a text or a web site

translate("This text will be translated to Japanese", to = "default")
translate("https://transdoc.atusy.net", to = "ja")

Set default destination language

Unless the destination language is set, it is taken as English.

options(transdoc_to = "ja")

You can see full list of available languages by the language object. You can use either a name or a value of an element in the language.

language


atusy/transdoc documentation built on May 17, 2020, 4:38 p.m.