translator

package
v0.0.0-...-c0cef93 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine interface {
	Translate(text string) (string, error)
}

type GoogleTranslator

type GoogleTranslator struct {
	// contains filtered or unexported fields
}

func NewGoogleTranslator

func NewGoogleTranslator(target, source language.Tag, apiKey, p string) (*GoogleTranslator, error)

func (*GoogleTranslator) Close

func (g *GoogleTranslator) Close() error

func (*GoogleTranslator) Translate

func (g *GoogleTranslator) Translate(text string) (string, error)

Jump to

Keyboard shortcuts

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