Skip to content

Yandex.Translate API wrapper (Translate/Detect/Languages) with LC constants and optional http client for proxy

License

Notifications You must be signed in to change notification settings

rogozhka/ytrwrap

Repository files navigation

GoDoc Travis Go Report Card codecov

ytrwrap is a wrapper for Yandex.Translate API. Free API key is required to use machine translation service. Supports more than 90 languages and can translate separate words or complete texts. API consists of 3 simple methods: Languages, Translate, Detect.

Usage example

package main

import (
	"fmt"

	"github.com/rogozhka/ytrwrap"
)

func main() {

	tr := ytrwrap.NewYandexTranslate("<your-api-key")

	src := "the pony eat grass"

	out, err := tr.Translate(src, ytrwrap.FR, nil)
	if err != nil {
		panic(err)
	}

	fmt.Printf("%s", out)
	//
	// le poney, manger de l'herbe
	//

}

Contribution

Welcome feedback Issues and PR.

Licence

Released under the MIT License.

About

Yandex.Translate API wrapper (Translate/Detect/Languages) with LC constants and optional http client for proxy

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages