# NOT RUN {
# }
# NOT RUN {
text <- "to administer medicine to animals is frequently a very difficult matter,
and yet sometimes it's necessary to do so"
gl_translate(text, target = "ja")
# translate webpages using rvest to process beforehand
library(rvest)
library(googleLanguageR)
# translate webpages
# dr.dk article
my_url <- "http://bit.ly/2yhrmrH"
## in this case the content to translate is in css selector '.wcms-article-content'
read_html(my_url) %>%
html_node(css = ".wcms-article-content") %>%
html_text %>%
gl_translate(format = "html")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab