i18nc

package
v0.7.56 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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) LocalTpl

func (ic *I18nCustom) LocalTpl(id string, data ...any) string

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL