Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
Translator provides a msgPrinter that can display localised strings for translation of the UI
func NewTranslator ¶
func NewTranslator() *Translator
NewTranslator creates a new Translator in the locale of the system. Strings translater by this Translator instance will be localised if a translation is available.
func (*Translator) Translate ¶
func (t *Translator) Translate(key string, args ...interface{}) string
Translate will take a string defined in English and apply the appropriate translation (if available) of the defined Translator.
Click to show internal directories.
Click to hide internal directories.