translations

package
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL