Versions in this module Expand all Collapse all v0 v0.1.0 Feb 13, 2023 Changes in this version + const ErrBadParamSyntaxCode + const ErrCardinalTranslationCode + const ErrConflictingTranslationCode + const ErrExistingTranslatorCode + const ErrExportPathFailureCode + const ErrExportWriteFailureCode + const ErrImportPathFailureCode + const ErrImportReadFailureCode + const ErrInvalidRuleTypeCode + const ErrKeyIsNotStringCode + const ErrLocaleNotRegisteredCode + const ErrMissingBraceCode + const ErrMissingPluralTranslationCode + const ErrOrdinalTranslationCode + const ErrRangeTranslationCode + const ErrRegisterValidationTranslationFailureCode + const ErrUnknownTranslationCode + const RuleTypeCardinal + const RuleTypeOrdinal + const RuleTypePlain + const RuleTypeRange + type ErrBadParamSyntax struct + Key string + Locale string + Param string + Text string + func (e *ErrBadParamSyntax) Code() int + func (e *ErrBadParamSyntax) Error() string + func (e *ErrBadParamSyntax) InternalError() error + type ErrCardinalTranslation struct + Text string + func (e *ErrCardinalTranslation) Code() int + func (e *ErrCardinalTranslation) Error() string + func (e *ErrCardinalTranslation) InternalError() error + type ErrConflictingTranslation struct + Key string + Locale string + Rule locales.PluralRule + Text string + func (e *ErrConflictingTranslation) Code() int + func (e *ErrConflictingTranslation) Error() string + func (e *ErrConflictingTranslation) InternalError() error + type ErrExistingTranslator struct + Locale string + func (e *ErrExistingTranslator) Code() int + func (e *ErrExistingTranslator) Error() string + func (e *ErrExistingTranslator) InternalError() error + type ErrExportPathFailure struct + Err error + Path string + func (e *ErrExportPathFailure) Code() int + func (e *ErrExportPathFailure) Error() string + func (e *ErrExportPathFailure) InternalError() error + type ErrExportWriteFailure struct + Err error + Path string + func (e *ErrExportWriteFailure) Code() int + func (e *ErrExportWriteFailure) Error() string + func (e *ErrExportWriteFailure) InternalError() error + type ErrImportPathFailure struct + Err error + Path string + func (e *ErrImportPathFailure) Code() int + func (e *ErrImportPathFailure) Error() string + func (e *ErrImportPathFailure) InternalError() error + type ErrImportReadFailure struct + Err error + Path string + func (e *ErrImportReadFailure) Code() int + func (e *ErrImportReadFailure) Error() string + func (e *ErrImportReadFailure) InternalError() error + type ErrInvalidRuleType struct + RuleType string + func (e *ErrInvalidRuleType) Code() int + func (e *ErrInvalidRuleType) Error() string + func (e *ErrInvalidRuleType) InternalError() error + type ErrKeyIsNotString struct + func (e *ErrKeyIsNotString) Code() int + func (e *ErrKeyIsNotString) Error() string + func (e *ErrKeyIsNotString) InternalError() error + type ErrLocaleNotRegistered struct + Locale string + func (e *ErrLocaleNotRegistered) Code() int + func (e *ErrLocaleNotRegistered) Error() string + func (e *ErrLocaleNotRegistered) InternalError() error + type ErrMissingBrace struct + Key interface{} + Locale string + Text string + func (e *ErrMissingBrace) Code() int + func (e *ErrMissingBrace) Error() string + func (e *ErrMissingBrace) InternalError() error + type ErrMissingPluralTranslation struct + Key string + Locale string + Rule locales.PluralRule + TranslationType string + func (e *ErrMissingPluralTranslation) Code() int + func (e *ErrMissingPluralTranslation) Error() string + func (e *ErrMissingPluralTranslation) InternalError() error + type ErrOrdinalTranslation struct + Text string + func (e *ErrOrdinalTranslation) Code() int + func (e *ErrOrdinalTranslation) Error() string + func (e *ErrOrdinalTranslation) InternalError() error + type ErrRangeTranslation struct + Text string + func (e *ErrRangeTranslation) Code() int + func (e *ErrRangeTranslation) Error() string + func (e *ErrRangeTranslation) InternalError() error + type ErrRegisterValidationTranslationFailure struct + Err error + Locale string + Tag string + func (e *ErrRegisterValidationTranslationFailure) Code() int + func (e *ErrRegisterValidationTranslationFailure) Error() string + func (e *ErrRegisterValidationTranslationFailure) InternalError() error + type ErrUnknownTranslation struct + Key string + func (e *ErrUnknownTranslation) Code() int + func (e *ErrUnknownTranslation) Error() string + func (e *ErrUnknownTranslation) InternalError() error + type UniversalTranslator struct + func NewUniversalTranslator(fallback locales.Translator, supportedLocales ...locales.Translator) *UniversalTranslator + func (t *UniversalTranslator) AddTranslator(ctx context.Context, translator locales.Translator, override bool) error + func (t *UniversalTranslator) FindTranslator(locales ...string) (trans ut.Translator, found bool) + func (t *UniversalTranslator) GetFallback() ut.Translator + func (t *UniversalTranslator) GetTranslator(locale string) (trans ut.Translator, found bool) + func (t *UniversalTranslator) VerifyTranslations() (err error) + func (ut *UniversalTranslator) Export(ctx context.Context, path string) error + func (ut *UniversalTranslator) Import(ctx context.Context, path string) error + func (ut *UniversalTranslator) ImportFromReader(ctx context.Context, reader io.Reader) error