language

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EN = language.English.String()
	CN = language.Chinese.String()
	JP = language.Japanese.String()
	TC = language.TraditionalChinese.String()
)
View Source
var Lang = LangMap{
	language.Chinese.String():            cn,
	language.English.String():            en,
	language.Japanese.String():           jp,
	language.TraditionalChinese.String(): tc,

	"cn": cn,
	"en": en,
	"jp": jp,
	"tc": tc,
}

Functions

func Add

func Add(key string, lang map[string]string)

func Get

func Get(value string) string

func GetFromHtml

func GetFromHtml(value template.HTML) template.HTML

func GetWithScope added in v0.0.5

func GetWithScope(value string, scopes ...string) string

Types

type LangMap

type LangMap map[string]map[string]string

func (LangMap) Get

func (lang LangMap) Get(value string) string

func (LangMap) GetWithScope added in v0.0.5

func (lang LangMap) GetWithScope(value string, scopes ...string) string

Jump to

Keyboard shortcuts

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