Categorygithub.com/pghq/go-ink
modulepackage
0.0.8
Repository: https://github.com/pghq/go-ink.git
Documentation: pkg.go.dev

# README

go-ink

Golang text translation library.

Installation

go-ink may be installed using the go get command:

go get github.com/pghq/go-ink

Usage

import (
    "github.com/pghq/go-ink"
    "github.com/pghq/go-ink/lang"
)

To create a new client:

lin := ink.New("your-api-key")
text, err := lin.Translate(context.TODO(), "Hello, world!", lang.German)
if err := radar.Error(); err != nil{
    panic(err)
}

Powered by

# Packages

No description provided by the author
No description provided by the author

# Functions

Database sets a custom database.
New creates a new linguist instance.
Translator sets a custom translator.

# Constants

TranslateTTL is the cache ttl for translations.

# Structs

Linguist translates text to various languages.

# Type aliases

LinguistOption to configure custom translator.