Documentation ¶
Overview ¶
Internationalization implementation using nicksnyder/go-i18n
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Goi18n ¶
type Goi18n struct {
// contains filtered or unexported fields
}
go-i18n implementation
func (*Goi18n) MustLocalize ¶
func (l *Goi18n) MustLocalize(id string, tmplEntries ...*localize.TemplateEntry) string
MustLocalize loads a i18n message from the file system You can pass dynamic values using template entries Examples:
`localizer.MustLocalize("my-message-id", &localize.TemplateEntry{"Name", "Danny"}`
func (*Goi18n) MustLocalizeError ¶
func (l *Goi18n) MustLocalizeError(id string, tmplEntries ...*localize.TemplateEntry) error
MustLocalizeError loads a i18n message from the file system and returns an error Examples:
`err := localizer.MustLocalizeError("my-message-id", &localize.TemplateEntry{"Name", "Danny"}`
Click to show internal directories.
Click to hide internal directories.