translate

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 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(tag language.Tag)

SetPreferredLanguage configures which language future messages should use.

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