catalog

package
v0.7.7 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultFileName = "out.gotext.json"
)

Functions

This section is empty.

Types

type CCatalog added in v0.5.0

type CCatalog struct {
	// contains filtered or unexported fields
}

func (*CCatalog) AddCatalog added in v0.5.0

func (c *CCatalog) AddCatalog(others ...catalog.Catalog)

func (*CCatalog) AddLocalesFromFS added in v0.5.0

func (c *CCatalog) AddLocalesFromFS(defaultTag language.Tag, efs beFs.FileSystem)

func (*CCatalog) AddLocalesFromJsonBytes added in v0.5.0

func (c *CCatalog) AddLocalesFromJsonBytes(tag language.Tag, src string, contents []byte)

func (*CCatalog) LocaleTags added in v0.5.0

func (c *CCatalog) LocaleTags() (tags []language.Tag)

func (*CCatalog) LocaleTagsWithDefault added in v0.5.0

func (c *CCatalog) LocaleTagsWithDefault(d language.Tag) (tags []language.Tag)

func (*CCatalog) MakeGoTextCatalog added in v0.5.0

func (c *CCatalog) MakeGoTextCatalog() (gtc catalog.Catalog, err error)

type Catalog

type Catalog interface {
	AddCatalog(others ...catalog.Catalog)
	AddLocalesFromFS(defaultTag language.Tag, efs beFs.FileSystem)
	AddLocalesFromJsonBytes(tag language.Tag, src string, contents []byte)

	LocaleTags() (tags []language.Tag)
	LocaleTagsWithDefault(d language.Tag) (tags []language.Tag)

	MakeGoTextCatalog() (gtc catalog.Catalog, err error)
}

func New added in v0.5.0

func New() (c Catalog)

Jump to

Keyboard shortcuts

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