Versions in this module Expand all Collapse all v0 v0.1.0 May 13, 2022 Changes in this version + var DefaultLoaderConfig = LoaderConfig + func GetMessage(r *http.Request, format string, args ...interface{}) string + func Router(next http.Handler) http.Handler + func SetDefaultLanguage(langCode string) bool + func Tr(lang, format string, args ...interface{}) string + type I18n struct + ContextKey interface{} + Cookie string + DefaultMessageFunc MessageFunc + ExtractFunc func(*http.Request) string + Strict bool + Subdomain bool + URLParameter string + var Default *I18n + func New(loader Loader, languages ...string) (*I18n, error) + func (i *I18n) GetLocale(r *http.Request) *Locale + func (i *I18n) GetMessage(r *http.Request, format string, args ...interface{}) (msg string) + func (i *I18n) Router(next http.Handler) http.Handler + func (i *I18n) SetDefault(langCode string) bool + func (i *I18n) Tr(lang, format string, args ...interface{}) (msg string) + func (i *I18n) TryMatchString(s string) (language.Tag, int, bool) + type Loader func(m *Matcher) (Localizer, error) + func Assets(assetNames func() []string, asset func(string) ([]byte, error), ...) Loader + func Glob(globPattern string, options ...LoaderConfig) Loader + type LoaderConfig = internal.Options + type Locale = internal.Locale + func GetLocale(r *http.Request) *Locale + type Localizer interface + GetLocale func(index int) *Locale + type Map = map[string]interface + type Matcher struct + Languages []language.Tag + func (m *Matcher) Match(t ...language.Tag) (language.Tag, int, language.Confidence) + func (m *Matcher) MatchOrAdd(t language.Tag) (tag language.Tag, index int, conf language.Confidence) + func (m *Matcher) ParseLanguageFiles(fileNames []string) (map[int][]string, error) + type MessageFunc = internal.MessageFunc