ut

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 4 Imported by: 1

README

GoZix Universal Translator

Documentation

Index

Constants

View Source
const (
	// BundleName is default definition name.
	BundleName = "universal-translator"

	// TagTranslator is tag to mark injected locale translator.
	TagTranslator = "universal-translator.locale-translator"

	// TagArgOverride is tag argument name to override locale translator.
	TagArgOverride = "override"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

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

Bundle implements the glue.Bundle interface.

func NewBundle

func NewBundle(options ...Option) *Bundle

NewBundle create bundle instance.

func (*Bundle) Build

func (b *Bundle) Build(builder *di.Builder) error

Build implements the glue.Bundle interface.

func (*Bundle) Name

func (b *Bundle) Name() string

Key implements the glue.Bundle interface.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option interface.

func Fallback

func Fallback(fallback locales.Translator) Option

Fallback option.

func Locales

func Locales(locales ...locales.Translator) Option

Locales option.

type Translator

type Translator = ut.Translator

Translator type alias of ut.Translator.

type UniversalTranslator

type UniversalTranslator = ut.UniversalTranslator

UniversalTranslator type alias of ut.UniversalTranslator.

Jump to

Keyboard shortcuts

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