Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Translator ¶
type Translator struct { DefaultLang string // must be one of TranslatorBundle's key Localizers map[string]*i18n.Localizer }
func NewTranslator ¶
func NewTranslator(defaultLang string, translatorBundles []TranslatorBundle) (translator Translator, err error)
func (*Translator) TranslateMessage ¶
func (t *Translator) TranslateMessage(messageID, language string) (translatedMsg string)
func (*Translator) TranslateMessageWithVars ¶
type TranslatorBundle ¶
Click to show internal directories.
Click to hide internal directories.