i18n

package
v4.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDict

func ParseDict(file []byte) (catalog.Dictionary, error)

Types

type Translator added in v4.11.0

type Translator map[string]*message.Printer

func New added in v4.11.0

func New(dir fs.FS, fallbackLang string) (Translator, error)

func (Translator) SupportedLanguages added in v4.11.0

func (p Translator) SupportedLanguages() []string

SupportedLanguages returns a sorted list of supported languages.

func (Translator) T added in v4.11.0

func (p Translator) T(lang, key string, values ...any) string

T returns the translated string for the given key in the specified language.

Jump to

Keyboard shortcuts

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