Files
metatube-server/_examples/translate/translate.go
T
2022-12-15 23:13:04 +08:00

19 lines
399 B
Go

package main
import (
"github.com/javtube/metatube-sdk-go/translate"
)
func main() {
var (
appId = "XXX"
appKey = "XXX"
)
// Translate `Hello` from auto to Japanese by Baidu.
translate.BaiduTranslate("Hello", "auto", "ja", appId, appKey)
var apiKey = "XXX"
// Translate `Hello` from auto to simplified Chinese by Google.
translate.GoogleTranslate("Hello", "auto", "zh-cn", apiKey)
}