translate

package module
v0.0.0-...-40db59d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2020 License: MIT Imports: 11 Imported by: 0

README

Translate

Translate library for golang!

Test

Usage

Translate from english to chinese

package main

import (
    "context"
    "fmt"

    "github.com/vcapi/translate"
)

func main() {
    input := "How old are you?"
    sLang := "en"
    tLang := "zh-CN"
    ctx := context.TODO()
    val, err := translate.Google(ctx, input, sLang, tLang)
    if err != nil {
        panic(err)
    }
    fmt.Println(val)
}
LICENSE

MIT License

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Google

func Google(ctx context.Context, text, sl, tl string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL