translate

package
v1.10.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Translations is a translation map from strings that can be output to console
	// to its translation in the user's system locale.
	Translations map[string]interface{}
)

Functions

func DetermineLocale

func DetermineLocale()

DetermineLocale finds the system locale and sets the preferred language for output appropriately.

func GetPreferredLanguage

func GetPreferredLanguage() language.Tag

GetPreferredLanguage returns the preferred language tag.

func SetPreferredLanguage

func SetPreferredLanguage(s string) error

SetPreferredLanguage configures which language future messages should use, based on a LANG string.

func T

func T(s string) string

T translates the given string to the preferred language.

Types

This section is empty.

Jump to

Keyboard shortcuts

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