Documentation ¶
Index ¶
- type I18nCustom
- func (ic *I18nCustom) AddBtnConfigs()
- func (ic *I18nCustom) AddConfigs()
- func (ic *I18nCustom) AddErrorConfigs()
- func (ic *I18nCustom) AddLocalizeConfig(message *i18n.Message)
- func (ic *I18nCustom) LocalTpl(id string, data ...any) string
- func (ic *I18nCustom) MustLocalize(id string, templateData any, pluralcount any) string
- func (ic *I18nCustom) SwitchLang(lang string)
- type LocalizeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I18nCustom ¶
type I18nCustom struct { CurrLang string Bundle *i18n.Bundle Localizer *i18n.Localizer Configs map[string]*i18n.LocalizeConfig TimeAgo *timeago.Config }
func New ¶
func New(files []string) *I18nCustom
func (*I18nCustom) AddBtnConfigs ¶
func (ic *I18nCustom) AddBtnConfigs()
func (*I18nCustom) AddConfigs ¶
func (ic *I18nCustom) AddConfigs()
func (*I18nCustom) AddErrorConfigs ¶
func (ic *I18nCustom) AddErrorConfigs()
func (*I18nCustom) AddLocalizeConfig ¶
func (ic *I18nCustom) AddLocalizeConfig(message *i18n.Message)
func (*I18nCustom) MustLocalize ¶
func (ic *I18nCustom) MustLocalize(id string, templateData any, pluralcount any) string
func (*I18nCustom) SwitchLang ¶
func (ic *I18nCustom) SwitchLang(lang string)
type LocalizeConfig ¶
type LocalizeConfig interface {
ParseData(data any) *i18n.LocalizeConfig
}
Click to show internal directories.
Click to hide internal directories.