lang

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileTranslator

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

FileTranslator loads translation dictionaries from core embed files and merges custom user translations from a specified local directory.

func NewTranslator

func NewTranslator(customDir string) *FileTranslator

NewTranslator constructs and loads a FileTranslator instance.

func (*FileTranslator) Trans

func (t *FileTranslator) Trans(locale string, key string, replace map[string]string) string

Trans resolves a localized string key in a given target locale, interpolating placeholders.

Jump to

Keyboard shortcuts

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