google_translate {polyglotr} | R Documentation |
Translate text using google translate
Description
Translate text using google translate
Usage
google_translate(text, target_language = "en", source_language = "auto")
Arguments
text |
This is the text that you want to translate. |
target_language |
This is the language that you want to translate the text into. The default value for this argument is "en" for English. |
source_language |
This is the language of the text that you want to translate. The default value for this argument is "auto", which means that the function will try to automatically detect the language of the text. |
Value
Translated text.
Examples
google_translate("I love languages", target_language = "es")
text_to_translate <- c("the", "quick", "brown")
google_translate(text_to_translate, "fr", "en")
[Package polyglotr version 1.5.1 Index]