Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teitei-tk/malwiya
Provide language translation operations using Microsoft Translator Text API with Go.
https://github.com/teitei-tk/malwiya
go golang library microsofttranslatortext tranlsate
Last synced: 26 days ago
JSON representation
Provide language translation operations using Microsoft Translator Text API with Go.
- Host: GitHub
- URL: https://github.com/teitei-tk/malwiya
- Owner: teitei-tk
- License: apache-2.0
- Created: 2017-01-17T09:15:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-30T11:50:30.000Z (almost 8 years ago)
- Last Synced: 2024-06-20T03:30:27.184Z (7 months ago)
- Topics: go, golang, library, microsofttranslatortext, tranlsate
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# malwiya [![Build Status](https://travis-ci.org/teitei-tk/malwiya.svg?branch=master)](https://travis-ci.org/teitei-tk/malwiya)
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
```go
package mainimport (
"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
* http://docs.microsofttranslator.com/text-translate.html## LICENSE
Apache License, Version 2.0