Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReTkk = regexp.MustCompile(`tkk:'(.+?)'`)
Functions ¶
Types ¶
type TranslateApi ¶
type TranslateApi struct {
// contains filtered or unexported fields
}
func New ¶
func New(config ...TranslateConfig) *TranslateApi
func (*TranslateApi) Translate ¶
func (a *TranslateApi) Translate(origin, src, dest string) (*TranslateResult, error)
Translate given content. Set src to `auto` and system will attempt to identify the source language automatically.
type TranslateConfig ¶
TranslateConfig basic config.
Click to show internal directories.
Click to hide internal directories.