Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReTkk = regexp.MustCompile(`tkk:'(.+?)'`)
Functions ¶
Types ¶
type Translated ¶ added in v0.2.2
type Translated struct { Src string // source language Dest string // destination language Origin string // original text Text string // translated text }
Translated result object.
type Translator ¶ added in v0.2.2
type Translator struct {
// contains filtered or unexported fields
}
func New ¶
func New(config ...Config) *Translator
func (*Translator) Translate ¶ added in v0.2.2
func (a *Translator) Translate(origin, src, dest string) (*Translated, error)
Translate given content. Set src to `auto` and system will attempt to identify the source language automatically.
Click to show internal directories.
Click to hide internal directories.