Documentation ¶
Index ¶
Constants ¶
View Source
const (
// Default lang key used to get the language from the ParseContext
LangKey = "lang"
)
Variables ¶
This section is empty.
Functions ¶
func SetLanguagesErrsMap ¶
func SetLanguagesErrsMap(m map[string]zconst.LangMap, defaultLang string, opts ...setLanguageOption)
Takes a map[langKey]conf.LangMap usage is i18n.SetLanguagesErrsMap(map[string]zconst.LangMap{ "es": es.Map, "en": en.Map, }, "en", i18n.WithLangKey("langKey")) schema.Parse(data, &dest, z.WithCtxValue("langKey", "es"))
func WithLangKey ¶
func WithLangKey(key string) setLanguageOption
Override the default lang key used to get the language from the ParseContext
Types ¶
Click to show internal directories.
Click to hide internal directories.