localize

package
v0.0.0-...-897bb11 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	*i18n.Bundle
}

func NewBundle

func NewBundle(paths ...string) Bundle

func (Bundle) For

func (b Bundle) For(lang Lang) *Localizer

type Lang

type Lang int
const (
	En Lang = iota
	Cy
)

func (Lang) String

func (l Lang) String() string

type Localizer

type Localizer struct {
	*i18n.Localizer

	Lang Lang
	// contains filtered or unexported fields
}

func (*Localizer) Concat

func (l *Localizer) Concat(list []string, joiner string) string

func (Localizer) Count

func (l Localizer) Count(messageID string, count int) string

func (Localizer) Format

func (l Localizer) Format(messageID string, data map[string]interface{}) string

func (Localizer) FormatCount

func (l Localizer) FormatCount(messageID string, count int, data map[string]interface{}) string

func (*Localizer) Possessive

func (l *Localizer) Possessive(s string) string

func (*Localizer) SetShowTranslationKeys

func (l *Localizer) SetShowTranslationKeys(s bool)

func (Localizer) ShowTranslationKeys

func (l Localizer) ShowTranslationKeys() bool

func (Localizer) T

func (l Localizer) T(messageID string) string

Jump to

Keyboard shortcuts

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