Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Detected ¶
type Detected struct { Lang string `json:"lang"` // detected language Confidence float64 `json:"confidence"` // the confidence of detection result (0.00 to 1.00) }
Detected represents language detection result
type Translated ¶
type Translated struct { Detected Detected `json:"detected"` Text string `json:"text"` // translated text Pronunciation string `json:"pronunciation"` // pronunciation of translated text }
func Translate ¶
func Translate(text, To string, params TranslationParams) (translated *Translated, err error)
TranslateWithParams translate a text with simple params as string
func TranslateWithClienID ¶
func TranslateWithClienID(text, To string, params TranslationWithClienIDParams) (translated *Translated, err error)
Click to show internal directories.
Click to hide internal directories.