deepl

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NorwegianBokmal deepl.Language = "NB"
	Indonesian      deepl.Language = "ID"
	Korean          deepl.Language = "KO"
	Turkish         deepl.Language = "TR"
	Ukrainian       deepl.Language = "UK"
)

Variables

This section is empty.

Functions

func AutoTranslate

func AutoTranslate(phrase string, client *deepl.Client) string

AutoTranslate translates a string from an unknown language using the DeepL API into English (British).

func CheckCode

func CheckCode(langCode string) bool

CheckCode checks if a language code is valid.

func GetLang

func GetLang(langCode string) deepl.Language

GetLang returns the deepl language for a given language code.

func TranslateTo

func TranslateTo(lang string, phrase string, client *deepl.Client) string

TranslateTo translates a string from an unknown language using the DeepL API into a requested language (Default: British English).

Types

This section is empty.

Jump to

Keyboard shortcuts

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