gotext

package
v0.0.0-...-9129f25 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 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 Option

type Option func(*Provider)

Option confires message provider.

func WithCatalog

func WithCatalog(domain string, cat catalog.Catalog) Option

WithCatalog set coatalog bu domain name.

type Provider

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

Provider provider messages.

func NewProvider

func NewProvider(opts ...Option) *Provider

NewProvider creates new messgae provider.

func (*Provider) Translate

func (mp *Provider) Translate(ctx context.Context, key string, opt translation.Translate) string

Translate by key and args.

Jump to

Keyboard shortcuts

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