translation: Index | Files

package gotext

import ""


Package Files


type Option Uses

type Option func(*Provider)

Option confires message provider.

func WithCatalog Uses

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

WithCatalog set coatalog bu domain name.

type Provider Uses

type Provider struct {
    // contains filtered or unexported fields

Provider provider messages.

func NewProvider Uses

func NewProvider(opts ...Option) *Provider

NewProvider creates new messgae provider.

func (*Provider) Translate Uses

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

Translate by key and args.

Package gotext imports 8 packages (graph) and is imported by 1 packages. Updated 2020-05-22. Refresh now. Tools for package owners.