Documentation
¶
Index ¶
- Variables
- type Engine
- func (c *Engine) TranslateBatchPlain(src []string, from, to language.Tag) ([]string, error)
- func (c *Engine) TranslateMarkdown(src []byte, from, to language.Tag) (ret []byte, err error)
- func (c *Engine) TranslateMarkdownText(src string, from, to language.Tag) (ret string, err error)
- func (c *Engine) TranslatePlain(src []byte, from, to language.Tag) (ret []byte, err error)
- func (c *Engine) TranslatePlainText(src string, from, to language.Tag) (ret string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRequestFailed = errors.New("request failed") ErrTranslationNotMatch = errors.New("translation result length not match") )
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is the config of translation server
func (*Engine) TranslateBatchPlain ¶
TranslateBatchSeq translate a series of sequences of text
func (*Engine) TranslateMarkdown ¶
TranslateMarkdown translate markdown with bytes
func (*Engine) TranslateMarkdownText ¶
TranslateMarkdown translate markdown text
func (*Engine) TranslatePlain ¶
Translate translate sequence of bytes
Click to show internal directories.
Click to hide internal directories.