Documentation ¶
Index ¶
- Variables
- func Associate(messageFile *i18n.MessageFile, languageCodes ...string) error
- func LoadMessageFile(path string) (*i18n.MessageFile, error)
- func LoadMessageFileBytes(content []byte, path string) (*i18n.MessageFile, error)
- func Pack(langs []string, code string, data interface{}, msgArgs ...interface{}) interface{}
- func PackFully(langs []string, code, msg string, data interface{}, msgArgs ...interface{}) interface{}
- func Seal(langs []string, code string, data interface{}, msgArgs ...interface{}) (string, error)
- func SealFully(langs []string, code, msg string, data interface{}, msgArgs ...interface{}) (string, error)
- func SetUp(defaultLanguage language.Tag, maker BeanMaker)
- type BeanMaker
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NotSetupError = errorKit.Newf("haven’t been set up correctly")
)
Functions ¶
func Associate ¶ added in v3.0.21
func Associate(messageFile *i18n.MessageFile, languageCodes ...string) error
Associate 关联其他语言代码.
@param languageCode 语言代码,(1) 可参考: i18nKit/_info.md
(2) 大小写“不敏感”
func LoadMessageFile ¶ added in v3.0.20
func LoadMessageFile(path string) (*i18n.MessageFile, error)
func LoadMessageFileBytes ¶ added in v3.0.20
func LoadMessageFileBytes(content []byte, path string) (*i18n.MessageFile, error)
func PackFully ¶
func PackFully(langs []string, code, msg string, data interface{}, msgArgs ...interface{}) interface{}
PackFully
@param langs 可以为空(包括nil)
Types ¶
Click to show internal directories.
Click to hide internal directories.