translate: Translate English sentence into Chinese, or translate Chinese...

View source: R/translate.R

translateR Documentation

Translate English sentence into Chinese, or translate Chinese sentence into English

Description

When you pass in an English or Chinese sentence, this function will calls the Youdao text translation API for R to return the corresponding type of Chinese or English representation.

Usage

translate(input, from = "auto", to = "auto")

Arguments

input

An English or Chinese sentence.

from

The source language, an optional parameter.

to

The target language, an optional parameter.

Value

The translation results about target language.

Examples

## Not run: 
  translate("I like China")
  translate("quarto", from = "en", to = "zh-CHS")

## End(Not run)


ecce documentation built on June 27, 2024, 5:09 p.m.