Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultLanguage ¶
GetDefaultLanguage returns the default i18n language used
func GetDefaultLocales ¶
GetDefaultLocales returns the default locale files
Types ¶
type Localizer ¶
type Localizer interface {
MustLocalize(id string, templateEntries ...*TemplateEntry) string
}
Localizer is an abstract interface which defines methods to load i18n messages
type TemplateEntry ¶
type TemplateEntry struct { Key string Value interface{} }
TemplateEntry is a type which defines variable interpolation key:value pairs which are used to pass dynamic values to the template
func NewEntry ¶
func NewEntry(key string, val interface{}) *TemplateEntry
NewEntry returns a new template entry which is a type for interpolating a string
Click to show internal directories.
Click to hide internal directories.