i18n

package
v0.0.0-...-8311826 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePrinter

func DeletePrinter(id string)

func Fprintf

func Fprintf(id string, w io.Writer, key message.Reference, a ...interface{}) (n int, err error)

func Printf

func Printf(id string, format string, args ...interface{}) (n int, err error)

func Sprintf

func Sprintf(id string, format string, args ...interface{}) string

Types

type PluralRule

type PluralRule struct {
	Pos   int
	Expr  string
	Value int
	Text  string
}

PluralRule is Plural rule

func Plural

func Plural(cases ...interface{}) []PluralRule

Plural is Plural function

type PrinterSession

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

func RegistPrinter

func RegistPrinter(id string, lang language.Tag) *PrinterSession

func Session

func Session(id string) *PrinterSession

Session load session with target id

func (*PrinterSession) Fprintf

func (s *PrinterSession) Fprintf(w io.Writer, key message.Reference, a ...interface{}) (n int, err error)

Fprintf is like fmt.Fprintf, but using language-specific formatting.

func (*PrinterSession) Printf

func (s *PrinterSession) Printf(format string, args ...interface{}) (n int, err error)

Printf is like fmt.Printf, but using language-specific formatting.

func (*PrinterSession) Sprintf

func (s *PrinterSession) Sprintf(format string, args ...interface{}) string

Sprintf is like fmt.Sprintf, but using language-specific formatting.

Jump to

Keyboard shortcuts

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