i18n

package
v0.0.0-...-5cbc45b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMessage

func DefaultMessage(m *Message) string

Types

type Bundle

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

func NewBundle

func NewBundle(defaultLanguage language.Tag) *Bundle

func (*Bundle) AddMessages

func (b *Bundle) AddMessages(tag language.Tag, messages ...*Message) error

func (*Bundle) LanguageTags

func (b *Bundle) LanguageTags() []language.Tag

func (*Bundle) LoadBytes

func (b *Bundle) LoadBytes(data []byte, name string) error

func (*Bundle) LoadFS

func (b *Bundle) LoadFS(fs fs.FS, paths []string) error

func (*Bundle) MustAddMessages

func (b *Bundle) MustAddMessages(tag language.Tag, messages ...*Message)

func (*Bundle) MustLoadBytes

func (b *Bundle) MustLoadBytes(data []byte, name string)

func (*Bundle) MustLoadFS

func (b *Bundle) MustLoadFS(fs fs.FS, paths ...string)

type LocalizeConfig

type LocalizeConfig = i18n.LocalizeConfig

type Localizer

type Localizer = i18n.Localizer

func NewLocalizer

func NewLocalizer(bundle *Bundle, langs ...string) *Localizer

type Message

type Message = i18n.Message

func T

func T(id string) *Message

Jump to

Keyboard shortcuts

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