Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoI18n ¶
GoI18n is a type which stores the details to create bundle
func (*GoI18n) LocalizeByID ¶
func (i *GoI18n) LocalizeByID(messageId string, template ...*TemplateEntry) string
LocalizeByID helps in localizing by passing id present in local file pass dynamic value using template entries
type Localizer ¶
type Localizer interface { // LocalizeById takes ID LocalizeByID(messageId string, template ...*TemplateEntry) string }
Localizer is an Interface for localizing messages from locals
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.