translate_gadget: Translate text with a shiny gadget.

Description Usage Arguments Value Examples

View source: R/translate.R

Description

This uses the MS translation API - you need your key and secret set as MS_TRANSLATE_KEY and MS_TRANSLATE_SECRET environment variables.

Usage

1
2
3

Arguments

text

Default text to translate.

to

Default language to translate to. See translate_lang() to get a full list of options.

Value

A length one character vector containing the translated text.

Examples

1
2
if (interactive())
  translate_gadget("My name is Hadley", "fr")

hadley/hadladdin documentation built on May 17, 2019, 10:40 a.m.