i18nx

package
v0.0.0-...-c6e4f4a Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MulanPSL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

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

func NewBundle

func NewBundle() *Bundle

func (*Bundle) Instance

func (b *Bundle) Instance() *i18n.Bundle

func (*Bundle) LoadEmbedFS

func (b *Bundle) LoadEmbedFS(fs embed.FS, dir string) error

func (*Bundle) Localize

func (b *Bundle) Localize(lang string, id string, opts ...OptionFunc) (string, error)

type OptionFunc

type OptionFunc func(config *i18n.LocalizeConfig) *i18n.LocalizeConfig

func WithData

func WithData(data interface{}) OptionFunc

func WithPluralCount

func WithPluralCount(pluralCount interface{}) OptionFunc

Jump to

Keyboard shortcuts

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