Documentation ¶
Index ¶
Constants ¶
View Source
const ( EN = "en" ZH_TW = "zh-TW" ZH_CN = "zh-CN" )
ISO-639-1 Code See: https://cloud.google.com/translate/docs/languages
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
func NewText ¶
func NewText(t string, tl string) *Interpreter
New returns a pointer to a new, empty `Interpreter` object
func (*Interpreter) Append ¶
func (i *Interpreter) Append(t string)
Append append text `t` to the interpretor
func (*Interpreter) Interpret ¶
func (i *Interpreter) Interpret() (string, error)
Interpret interpret source text `t`
func (*Interpreter) Link ¶
func (i *Interpreter) Link() string
Link returns the request url of google translate
Click to show internal directories.
Click to hide internal directories.