i18n

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type I18n

type I18n struct {
	Bundle *i18n.Bundle
	// contains filtered or unexported fields
}

func NewI18n

func NewI18n(options ...NewI18nOption) (*I18n, error)

func (*I18n) TWithLanguage

func (i *I18n) TWithLanguage(lang string, key string, args ...any) string

func (*I18n) TWithTag

func (i *I18n) TWithTag(lang language.Tag, key string, args ...any) string

type M

type M = map[string]any

type NewI18nOption

type NewI18nOption func(*newI18nOptions)

func WithLocalesDir

func WithLocalesDir(dir string) NewI18nOption

func WithLogger

func WithLogger(logger *logger.Logger) NewI18nOption

Jump to

Keyboard shortcuts

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