gtranslate

package module
v0.0.0-...-df52a5f Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 14 Imported by: 0

README

gtrans

google translate

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoogleHost = "google.com"

Functions

func Translate

func Translate(text string, from language.Tag, to language.Tag, googleHost ...string) (string, error)

Translate translate a text using native tags offer by go language

func TranslateWithParams

func TranslateWithParams(text string, params TranslationParams) (string, error)

TranslateWithParams translate a text with simple params as string

Types

type TranslationParams

type TranslationParams struct {
	From       string
	To         string
	Tries      int
	Delay      time.Duration
	GoogleHost string
}

TranslationParams is a util struct to pass as parameter to indicate how to translate

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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