Documentation ¶
Index ¶
- func ParseInput(input, trigger string) (string, []string, []string)
- type Bundle
- func (b *Bundle) GetServerLocalizer() *i18n.Localizer
- func (b *Bundle) GetUserLocalizer(userID string) *i18n.Localizer
- func (b *Bundle) LocalizeDefaultMessage(l *i18n.Localizer, m *i18n.Message) string
- func (b *Bundle) LocalizeErrorMessage(l *i18n.Localizer, m *ErrorMessage) string
- func (b *Bundle) LocalizeWithConfig(l *i18n.Localizer, lc *i18n.LocalizeConfig) string
- type ErrorMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bundle ¶ added in v1.5.0
Bundle stores a set ot messages and translates messages.
func InitBundle ¶ added in v1.5.0
InitBundle loads all localization files in i18n into a bundle and return this
func (*Bundle) GetServerLocalizer ¶ added in v1.5.0
GetServerLocalizer returns a localizer that localizes in the server default client locale
func (*Bundle) GetUserLocalizer ¶ added in v1.5.0
GetUserLocalizer returns a localizer that localizes in the users locale
func (*Bundle) LocalizeDefaultMessage ¶ added in v1.5.0
LocalizeDefaultMessage localizer the provided message
func (*Bundle) LocalizeErrorMessage ¶ added in v1.5.0
func (b *Bundle) LocalizeErrorMessage(l *i18n.Localizer, m *ErrorMessage) string
LocalizeErrorMessage localizer the provided error message
func (*Bundle) LocalizeWithConfig ¶ added in v1.5.0
LocalizeWithConfig localizer the provided localize config
type ErrorMessage ¶ added in v1.5.0
ErrorMessage contains error messsage for a user that can be localized. It should not be wrapped and instead always returned.
Click to show internal directories.
Click to hide internal directories.