Documentation ¶
Overview ¶
Package i18n provides internationalize.
Index ¶
- Variables
- type Fallback
- type Formatter
- type Loader
- type Localizer
- func (l *Localizer) Fallback(fn Fallback) *Localizer
- func (l *Localizer) Formatter(fn Formatter) *Localizer
- func (l *Localizer) Get(key string) string
- func (l *Localizer) GetNum(key string, n uint) string
- func (l *Localizer) GetNumf(key string, n uint, args ...interface{}) string
- func (l *Localizer) Getf(key string, args ...interface{}) string
- func (l *Localizer) NTCf(key string, n uint, rep R) string
- func (l *Localizer) NTf(key string, rep R) string
- func (l *Localizer) NamedGetNumf(key string, n uint, rep R) string
- func (l *Localizer) NamedGetf(key string, rep R) string
- func (l *Localizer) Selector(fn Selector) *Localizer
- func (l *Localizer) T(key string) string
- func (l *Localizer) TC(key string, n uint) string
- func (l *Localizer) TCf(key string, n uint, args ...interface{}) string
- func (l *Localizer) Tf(key string, args ...interface{}) string
- type M
- type Message
- type R
- type Replace
- type Selector
- type Translator
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Loader ¶
func NewJSONLoader ¶
func NewJSONLoader() Loader
func NewYAMLLoader ¶
func NewYAMLLoader() Loader
type Localizer ¶
type Localizer struct {
// contains filtered or unexported fields
}
func NewLocalizer ¶
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
func NewTranslator ¶
func NewTranslator() *Translator
func (*Translator) Fallback ¶
func (t *Translator) Fallback(l *Localizer)
func (*Translator) IsSupported ¶
func (t *Translator) IsSupported(tag language.Tag) bool
Click to show internal directories.
Click to hide internal directories.