Description Usage Arguments Value Examples
Slick function to retrieve translation from the Google Translate API
1 | gl_translate(str, target, key)
|
str |
vector of strings |
target |
target language code |
key |
API key |
A list of tibbles
.
1 2 3 4 5 6 7 8 9 10 | library(tidyverse)
gl_translate(c("Bonjour", "hallo", "ola"), target='en', key=your_api_key)
# tidyr
tibble(str=c("Bonjour", "hallo", "ola")) %>%
mutate(translated=gl_translate(str,
target='en', key=api_key)) %>%
unnest(col='translated')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.