i18n

package
v0.0.0-...-4e18fe8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Localizer

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

func NewLocalizer

func NewLocalizer(t *testing.T) *Localizer

NewLocalizer creates a new Localizer. If a term is not found, Localizer will panic.

func NewLocalizerWithDefault

func NewLocalizerWithDefault(t *testing.T, def string) *Localizer

NewLocalizerWithDefault creates a new Localizer using the passed default. If a term is not found, Localizer will return the default value.

func (*Localizer) Build

func (l *Localizer) Build() *i18n.Localizer

Build builds the localizer.

func (*Localizer) Clone

func (l *Localizer) Clone(t *testing.T) *Localizer

Clone creates a clone of the localizer.

func (*Localizer) ErrorOn

func (l *Localizer) ErrorOn(term i18n.Term) *Localizer

ErrorOn returns an error whenever the passed term is requested.

func (*Localizer) On

func (l *Localizer) On(term i18n.Term, response string) *Localizer

On adds the passed response for the passed term to the localizer.

Jump to

Keyboard shortcuts

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