i18n

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// current lang
	LANG = "en_US"

	// en_US
	LANG_EN_US = LANG

	// zh_CN
	LANG_ZH_CN = "zh_CN"
)

Functions

func Get

func Get(tpl string, key string) string

从 yaml 模板提取内容

example:

var i18nTpl = ` hello:

en_US: hello
zh_CN: 你好

`

word := i18n.Get(i18nTpl, "hello")

Types

This section is empty.

Jump to

Keyboard shortcuts

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