i18n

package
v0.10.7 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 6 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 {
	// contains filtered or unexported fields
}

func NewBundle

func NewBundle(defaultLang language.Tag) *Bundle

NewBundle returns a bundle with a default language and a default set of plural rules.

func (Bundle) RenderEcode

func (l Bundle) RenderEcode(ecode string, data interface{}) *EcodeDetail

func (Bundle) RenderMessage

func (l Bundle) RenderMessage(key string, data interface{}) string

type EcodeDetail

type EcodeDetail struct {
	Ecode string // error code like: EXXXX
	Desc  string `yaml:"desc"` // basic description
	Text  string `yaml:"text"` // error text
	Help  string `yaml:"help"` // fix suggestion
}

See https://rustc-dev-guide.rust-lang.org/diagnostics.html

Jump to

Keyboard shortcuts

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