i18n

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IDToName = map[string]string{
		"zh-CN": "简体中文",
		"zh-TW": "繁體中文",
		"en-US": "English",
		"ja-JP": "日本語",
		"ko-KR": "한국어",
		"es-ES": "Español",
	}
)

Functions

func GetLanguage added in v1.12.0

func GetLanguage() string

GetLanguage returns the current display language code.

func Sprintf

func Sprintf(key message.Reference, a ...interface{}) string

Sprintf is just a wrapper function of message printer.

func SprintfColon

func SprintfColon(key message.Reference, a ...interface{}) string

SprintfColon adds a colon at the tail of a string.

func SprintfEllipsis

func SprintfEllipsis(key message.Reference, a ...interface{}) string

SprintfEllipsis adds an ellipsis at the tail of a string.

func SprintfLSpace

func SprintfLSpace(key message.Reference, a ...interface{}) string

SprintfLSpace adds a space at the start of a string.

func SprintfRSpace added in v1.10.0

func SprintfRSpace(key message.Reference, a ...interface{}) string

SprintfRSpace adds a space at the end of a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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