Versions in this module Expand all Collapse all v1 v1.0.1 Jun 30, 2026 v1.0.0 Jun 30, 2026 Changes in this version + const MaxFormatPrecision + const MaxJSONDepth + const MaxJSONSize + const MaxKeyCount + const MaxKeyDepth + const MaxKeyLength + const MaxLocaleLength + const MaxOutputLength + const MaxPrefixLength + func SanitizeOutput(s string) string + func ValidateFormatString(format string, argCount int) error + func ValidateKey(key string) error + func ValidateLocale(locale string) error + type Cacher interface + Get func(key string) (string, bool) + Invalidate func() + Set func(key string, value string) + type Detector interface + Detect func() string + type EnvProvider interface + Getenv func(key string) string + type ErrInvalidFormat struct + Cause error + Format string + func NewErrInvalidFormat(format string, cause error) *ErrInvalidFormat + func (e ErrInvalidFormat) Error() string + func (e ErrInvalidFormat) Is(target error) bool + func (e ErrInvalidFormat) Unwrap() error + type ErrInvalidKey struct + Cause error + Key string + func NewErrInvalidKey(key string, cause error) *ErrInvalidKey + func (e ErrInvalidKey) Error() string + func (e ErrInvalidKey) Is(target error) bool + func (e ErrInvalidKey) Unwrap() error + type ErrInvalidLocale struct + Cause error + Locale string + func NewErrInvalidLocale(locale string, cause error) *ErrInvalidLocale + func (e ErrInvalidLocale) Error() string + func (e ErrInvalidLocale) Is(target error) bool + func (e ErrInvalidLocale) Unwrap() error + type ErrKeyNotFound struct + Key string + func NewErrKeyNotFound(key string) *ErrKeyNotFound + func (e ErrKeyNotFound) Error() string + func (e ErrKeyNotFound) Is(target error) bool + type ErrPathTraversal struct + Path string + func NewErrPathTraversal(path string) *ErrPathTraversal + func (e ErrPathTraversal) Error() string + func (e ErrPathTraversal) Is(target error) bool + type ErrUnknownFormat struct + Extension string + func NewErrUnknownFormat(ext string) *ErrUnknownFormat + func (e ErrUnknownFormat) Error() string + func (e ErrUnknownFormat) Is(target error) bool + type FallbackChainer interface + GetChain func(locale string) []string + type FormattedTranslator interface + TranslateWithArgs func(key string, args ...interface{}) string + type GenderCategory string + const Feminine + const GenderOther + const Masculine + const Neuter + type GenderTranslator interface + TranslateGender func(key string, gender GenderCategory) string + type KeyChecker interface + HasKey func(key string) bool + type KeyResolver interface + Resolve func(translations map[string]interface{}, key string) (string, error) + type LeveledLogger interface + Debug func(msg string, args ...any) + Error func(msg string, args ...any) + Fatal func(msg string, args ...any) + Info func(msg string, args ...any) + Warn func(msg string, args ...any) + type LocaleDetector interface + type LocaleGetter interface + GetLocale func() string + type LocaleSetter interface + SetLocale func(locale string) + type LogLevel int + const LevelDebug + const LevelError + const LevelFatal + const LevelInfo + const LevelWarn + type Logger interface + Enabled func(level LogLevel) bool + WithContext func(ctx context.Context) Logger + WithFields func(fields ...any) Logger + WithLevel func(level LogLevel) Logger + type Normalizer interface + Normalize func(locale string) string + type PluralCategory string + const Few + const Many + const One + const Other + const Two + const Zero + type PluralResolver interface + Resolve func(locale string, count interface{}) PluralCategory + type PluralTranslator interface + TranslatePlural func(key string, count interface{}) string + type TranslationLoader interface + Load func(locale string) ([]byte, error) + type TranslationLookup interface + Translate func(key string) string + type TranslationParser interface + Parse func(data []byte) (map[string]interface{}, error) + type TranslatorProvider interface