Documentation ¶
Overview ¶
Package bundle manages translations for multiple locales.
Index ¶
- type Bundle
- func (b *Bundle) AddTranslation(locale *locale.Locale, translations ...translation.Translation)
- func (b *Bundle) LoadTranslationFile(filename string) error
- func (b *Bundle) MustLoadTranslationFile(filename string)
- func (b *Bundle) MustTfunc(localeID string, localeIDs ...string) TranslateFunc
- func (b *Bundle) Tfunc(localeID string, localeIDs ...string) (tf TranslateFunc, err error)
- func (b *Bundle) Translations() map[string]map[string]translation.Translation
- type TranslateFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func (*Bundle) AddTranslation ¶
func (b *Bundle) AddTranslation(locale *locale.Locale, translations ...translation.Translation)
func (*Bundle) LoadTranslationFile ¶
func (*Bundle) MustLoadTranslationFile ¶
func (*Bundle) MustTfunc ¶
func (b *Bundle) MustTfunc(localeID string, localeIDs ...string) TranslateFunc
func (*Bundle) Tfunc ¶
func (b *Bundle) Tfunc(localeID string, localeIDs ...string) (tf TranslateFunc, err error)
func (*Bundle) Translations ¶
func (b *Bundle) Translations() map[string]map[string]translation.Translation
type TranslateFunc ¶
TranslateFunc is a copy of i18n.TranslateFunc to avoid a circular dependency.
Click to show internal directories.
Click to hide internal directories.