Versions in this module Expand all Collapse all v1 v1.15.0 Sep 9, 2024 Changes in this version + const Binding + var ErrFileNotExist = errors.New("translation file does not exist") + type FileLoader struct + func NewFileLoader(paths []string, json foundation.Json) *FileLoader + func (f *FileLoader) Load(locale string, group string) (map[string]any, error) + type MessageSelector struct + func NewMessageSelector() *MessageSelector + func (m *MessageSelector) Choose(message string, number int, locale string) string + type ServiceProvider struct + func (translation *ServiceProvider) Boot(app foundation.Application) + func (translation *ServiceProvider) Register(app foundation.Application) + type Translator struct + func NewTranslator(ctx context.Context, loader translationcontract.Loader, locale string, ...) *Translator + func (t *Translator) Choice(key string, number int, options ...translationcontract.Option) string + func (t *Translator) CurrentLocale() string + func (t *Translator) Get(key string, options ...translationcontract.Option) string + func (t *Translator) GetFallback() string + func (t *Translator) Has(key string, options ...translationcontract.Option) bool + func (t *Translator) SetFallback(locale string) context.Context + func (t *Translator) SetLocale(locale string) context.Context