i18n

package
v3.0.16+incompatible Latest Latest
Warning

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

Go to latest
Published: May 24, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Zh = LanguageCode("zh")
	En = LanguageCode("en")
)

Variables

This section is empty.

Functions

func GetLanguage

func GetLanguage() string

func SetLanguage

func SetLanguage(lang string)

Types

type I18nError

type I18nError interface {
}

type LanguageCode

type LanguageCode string

type Text

type Text struct {
	// contains filtered or unexported fields
}

func T

func T(en string, zh string) *Text

func (*Text) Get

func (a *Text) Get(lang string) string

func (*Text) Put

func (a *Text) Put(lang string, txt string)

func (*Text) Text

func (a *Text) Text() string

Jump to

Keyboard shortcuts

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