translate_text: clessnverse::translate_text

translate_textR Documentation

clessnverse::translate_text

Description

translates the text provided as a parameter using language autodetection in the language

Usage

translate_text(
  text,
  engine = "azure",
  source_lang = NA,
  target_lang = "en",
  translate = FALSE
)

Arguments

text

: the text to translate

engine

: "azure" | "deeptranslate"

source_lang

: the language to translate from - if NA, then automatic detection will be performed

target_lang

: which language to translate to

translate

: translates for real. this is helpful to set to FALSE when debugging to avoid translation API fees

Value

a vector containing 1. a string = language detected and 2. a string = the translated text

Examples

example



clessn/clessn-verse documentation built on Feb. 18, 2024, 12:42 p.m.