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.New("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)
Types ¶
Click to show internal directories.
Click to hide internal directories.