Versions in this module Expand all Collapse all v12 v12.1.9 Aug 12, 2022 Changes in this version + type I18n struct + Cookie string + ExtractFunc func(ctx context.Context) string + PathRedirect bool + Strict bool + Subdomain bool + URLParameter string + func New() *I18n + func (i *I18n) GetLocale(ctx context.Context) context.Locale + func (i *I18n) GetMessage(ctx context.Context, format string, args ...interface{}) string + func (i *I18n) Load(globPattern string, languages ...string) error + func (i *I18n) LoadAssets(assetNames func() []string, asset func(string) ([]byte, error), ...) error + func (i *I18n) Loaded() bool + func (i *I18n) Reset(loader Loader, languages ...string) error + func (i *I18n) SetDefault(langCode string) bool + func (i *I18n) Tags() []language.Tag + func (i *I18n) Tr(lang, format string, args ...interface{}) string + func (i *I18n) TryMatchString(s string) (language.Tag, int, bool) + func (i *I18n) Wrapper() router.WrapperFunc + type Loader func(m *Matcher) (Localizer, error) + func Assets(assetNames func() []string, asset func(string) ([]byte, error), ...) Loader + func Glob(globPattern string, options ...LoaderOption) Loader + type LoaderConfig struct + FuncMap template.FuncMap + Left string + Right string + Strict bool + type LoaderOption func(*LoaderConfig) + type Localizer interface + GetLocale func(index int) context.Locale + 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 MemoryLocalizer map[int]context.Locale + func (l MemoryLocalizer) GetLocale(index int) context.Locale + func (l MemoryLocalizer) SetDefault(index int) bool