Documentation ¶
Index ¶
- Variables
- func AddLocale(langName string, customTranslation *lang.CustomTranslation, ...)
- func HasLocale(langName string) bool
- func Locale(langName string) *locale
- func NewCommonLanguage(langName string) locales.Translator
- func RegisterDefaultTranslations(v *validator.Validate, locale *locale) (err error)
- type FieldError
- type UnmarshalFunc
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 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
Click to show internal directories.
Click to hide internal directories.