Documentation ¶
Index ¶
- Constants
- func IsLocalizable(obj interface{}) (isLocalizable bool)
- func IsLocalizableFromCtx(ctx context.Context) (localeCode string, isLocalizable bool)
- type Builder
- func (b *Builder) EnsureLocale(in http.Handler) (out http.Handler)
- func (b *Builder) GetAllLocalePaths() []string
- func (b *Builder) GetCookieName() string
- func (b *Builder) GetCorrectLocaleCode(r *http.Request) string
- func (b *Builder) GetCurrentLocaleCodeFromCookie(r *http.Request) (localeCode string)
- func (b *Builder) GetLocaleLabel(localeCode string) string
- func (b *Builder) GetLocalePath(localeCode string) string
- func (b *Builder) GetQueryName() string
- func (b *Builder) GetSupportLocaleCodes() []string
- func (b *Builder) GetSupportLocaleCodesFromRequest(R *http.Request) []string
- func (b *Builder) GetSupportLocaleCodesFromRequestFunc(v func(R *http.Request) []string) (r *Builder)
- func (b *Builder) IsTurnedOn() bool
- func (b *Builder) RegisterLocales(localeCode, localePath, localeLabel string) (r *Builder)
- type L10nInterface
- type L10nONInterface
- type Locale
Constants ¶
View Source
const LocaleCode l10nContextKey = iota
Variables ¶
This section is empty.
Functions ¶
func IsLocalizable ¶
func IsLocalizable(obj interface{}) (isLocalizable bool)
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) GetAllLocalePaths ¶
func (*Builder) GetCookieName ¶
func (*Builder) GetCorrectLocaleCode ¶
func (*Builder) GetCurrentLocaleCodeFromCookie ¶
func (*Builder) GetLocaleLabel ¶
func (*Builder) GetLocalePath ¶
func (*Builder) GetQueryName ¶
func (*Builder) GetSupportLocaleCodes ¶
func (*Builder) GetSupportLocaleCodesFromRequest ¶
func (*Builder) GetSupportLocaleCodesFromRequestFunc ¶
func (*Builder) IsTurnedOn ¶
func (*Builder) RegisterLocales ¶
type L10nInterface ¶
type L10nONInterface ¶
type L10nONInterface interface {
L10nON()
}
Click to show internal directories.
Click to hide internal directories.