translators

package
v0.0.0-...-25a8327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaiduTranslatorOptions

type BaiduTranslatorOptions struct {
	Appid string
	Key   string
	From  string
	To    string
}

BaiduTranslatorOptions is what you need to get a new baidu translator

type Translator

type Translator interface {
	Translate(string, bool) string
}

Translator is a common interface for any kind of translator

func NewBaiduTranslator

func NewBaiduTranslator(options BaiduTranslatorOptions) Translator

NewBaiduTranslator returns a translator of Baidu API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL