Documentation ¶
Index ¶
- type IllegalFilename
- type LocaleNotSet
- type Locales
- func (l *Locales) ClearFallbackLocal()
- func (l *Locales) CurrentLocale() (tagName string)
- func (l *Locales) DisplayNameOf(tagName string) (displayName string, err error)
- func (l *Locales) FallbackLocale() (tagName string)
- func (l *Locales) GetLocaleNames() (displayNames []string)
- func (l *Locales) GetLocales() (tagNames []string)
- func (l *Locales) LoadLocaleFile(fsys fs.FS, path string) (displayName, tagName string, err error)
- func (l *Locales) LoadLocalesDir(dir string) (success []string, fail []string, err error)
- func (l *Locales) Localize(config *i18n.LocalizeConfig) (string, error)
- func (l *Locales) MustTr(id string, fallback string) string
- func (l *Locales) SetFallbackLocale(tagName string) (displayName string, err error)
- func (l *Locales) SetLocale(tagName string) (displayName string, err error)
- func (l *Locales) SetLocaleByDisplayName(displayName string) (tagName string, err error)
- func (l *Locales) TagNameOf(displayName string) (tagName string, err error)
- func (l *Locales) Tr(id string) (string, error)
- type MissingDisplayName
- type NotLoaded
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IllegalFilename ¶ added in v0.0.2
type IllegalFilename struct {
// contains filtered or unexported fields
}
func (IllegalFilename) Error ¶ added in v0.0.2
func (e IllegalFilename) Error() string
type LocaleNotSet ¶ added in v0.1.0
type LocaleNotSet struct {
// contains filtered or unexported fields
}
func (LocaleNotSet) Error ¶ added in v0.1.0
func (e LocaleNotSet) Error() string
type Locales ¶ added in v0.1.0
type Locales struct {
// contains filtered or unexported fields
}
func NewLocales ¶ added in v0.1.0
func NewLocalesWith ¶ added in v0.1.1
func (*Locales) ClearFallbackLocal ¶ added in v0.1.2
func (l *Locales) ClearFallbackLocal()
func (*Locales) CurrentLocale ¶ added in v0.1.2
func (*Locales) DisplayNameOf ¶ added in v0.1.0
func (*Locales) FallbackLocale ¶ added in v0.1.2
func (*Locales) GetLocaleNames ¶ added in v0.1.0
func (*Locales) GetLocales ¶ added in v0.1.0
func (*Locales) LoadLocaleFile ¶ added in v0.1.0
func (*Locales) LoadLocalesDir ¶ added in v0.1.0
func (*Locales) Localize ¶ added in v0.1.0
func (l *Locales) Localize(config *i18n.LocalizeConfig) (string, error)
func (*Locales) SetFallbackLocale ¶ added in v0.1.2
func (*Locales) SetLocaleByDisplayName ¶ added in v0.1.2
type MissingDisplayName ¶ added in v0.1.0
type MissingDisplayName struct {
// contains filtered or unexported fields
}
func (MissingDisplayName) Error ¶ added in v0.1.0
func (e MissingDisplayName) Error() string
Click to show internal directories.
Click to hide internal directories.