Documentation ¶
Index ¶
- Constants
- func LoadLocalization(localesPath string, templatesPath ...string) error
- type Bundle
- func (v *Bundle) GetLocalizedString(name string, lang string) string
- func (v *Bundle) GetLocalizedTemplate(name string, lang string) *template.Template
- func (v *Bundle) GetLocalizedTemplateHTML(name string, lang string) *htmpl.Template
- func (v *Bundle) GetLocalizedTemplatePath(name string, lang string) string
- func (v *Bundle) GetLocalizer(lang string) *i18n.Localizer
- func (v *Bundle) RenderLocalizedTemplate(name string, lang string, data any) string
- func (v *Bundle) RenderLocalizedTemplateHTML(name string, lang string, data any) string
Constants ¶
View Source
const FallbackLanguage = "en-US"
Variables ¶
This section is empty.
Functions ¶
func LoadLocalization ¶
Types ¶
type Bundle ¶
var L *Bundle
func (*Bundle) GetLocalizedString ¶
func (*Bundle) GetLocalizedTemplate ¶
func (*Bundle) GetLocalizedTemplateHTML ¶
func (*Bundle) GetLocalizedTemplatePath ¶
func (*Bundle) RenderLocalizedTemplate ¶
Click to show internal directories.
Click to hide internal directories.