Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMessage ¶
GetMessage get the i18n message
param is one of these type: messageID, *i18n.LocalizeConfig
Example:
GetMessage("hello") // messageID is hello
GetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": context.Param("name"),
},
})
func MustGetMessage ¶
MustGetMessage get the i18n message without error handling
param is one of these type: messageID, *i18n.LocalizeConfig
Example:
MustGetMessage("hello") // messageID is hello
MustGetMessage(&i18n.LocalizeConfig{
MessageID: "welcomeWithName",
TemplateData: map[string]string{
"name": context.Param("name"),
},
})
Types ¶
type BundleCfg ¶
type BundleCfg struct {
DefaultLanguage language.Tag
FormatBundleFile string
AcceptLanguage []language.Tag
RootPath string
UnmarshalFunc i18n.UnmarshalFunc
}
BundleCfg ...
Click to show internal directories.
Click to hide internal directories.