Skip to content

eiixy/go-translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translate

Usage

Install

go get github.com/eiixy/go-translate

Example

package main

import (
	"fmt"
	"github.com/eiixy/go-translate"
)

func main() {
	tr := translate.NewClient()
	texts, err := tr.Translates([]string{"hello", "world"})
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(texts)

	text, err := tr.Translate("hello world")
	if err != nil {
		fmt.Println(err)
		return 
	}
	fmt.Println(text)
}

License

MIT