localize

package
v0.0.0-...-9dac4f2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: BSD-2-Clause, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZH = "zh-CN"
	EN = "en-GB"
)

Variables

This section is empty.

Functions

func Translate

func Translate(ctx context.Context, key message.Reference, args ...interface{}) string

Types

type ILocalize

type ILocalize interface {
	Translate(ctx context.Context, key message.Reference, args ...interface{}) string
}

func ChangeLocale

func ChangeLocale(label string) (ILocalize, bool)

func Get

func Get(label string) (ILocalize, bool)

func MustGet

func MustGet(label string) ILocalize

Jump to

Keyboard shortcuts

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