Skip to content

Provide language translation operations using Microsoft Translator Text API with Go.

License

Notifications You must be signed in to change notification settings

teitei-tk/malwiya

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

malwiya Build Status

Provide language translation operations using Microsoft translator Text API with Go.

Installation

go get github.com/teitei-tk/malwiya

Dependency

  • Go Version 1.7.x or later

Usage

package main

import (
    "os"
    "log"
    "fmt"
    "github.com/teitei-tk/malwiya"
)

func main() {
    subscriptionKey := os.Getenv("SUBSCRIPTION_KEY")
    m := malwiya.New(subscriptionKey)

    fromTextLang := "en"
    toTextLang := "ja"
    text := "I love gopher♡"
    result, err := m.Translate(text, fromTextLang, toTextLang)
    if err != nil {
        log.Fatal(err)
    }

    fmt.Println(result) // 私は gopher♡ が大好き
}

TODO

  • Test code
  • Documents

Microsoft Translator Text API Reference

LICENSE

Apache License, Version 2.0

About

Provide language translation operations using Microsoft Translator Text API with Go.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages