internal

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LocalizerMap map[string]*i18n.Localizer

Functions

func AddLocale

func AddLocale(langName string, customTranslation *lang.CustomTranslation, validationTranslation *lang.ValidationTranslation)

func HasLocale

func HasLocale(langName string) bool

func Locale

func Locale(langName string) *locale

func NewCommonLanguage

func NewCommonLanguage(langName string) locales.Translator

New returns a new instance of translator for the 'commonLang' locale

func RegisterDefaultTranslations

func RegisterDefaultTranslations(v *validator.Validate, locale *locale) (err error)

RegisterDefaultTranslations registers a set of default translations for all built in tag's in validator; you may add your own as desired.

Types

type FieldError

type FieldError struct {
	validator.FieldError
	// contains filtered or unexported fields
}

func (*FieldError) Field

func (fe *FieldError) Field() string

func (*FieldError) Param

func (fe *FieldError) Param() string

type UnmarshalFunc

type UnmarshalFunc = i18n.UnmarshalFunc

Jump to

Keyboard shortcuts

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