i18n

package
v0.0.0-...-82cf213 Latest Latest
Warning

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

Go to latest
Published: May 13, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeletePrinter

func DeletePrinter(id string)

func Extract

func Extract(paths []string, outFile string) error

Extract messages

func Fprintf

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

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

func Generate

func Generate(id, pkgName string, paths []string, outFile string) error

Generate catalog.go

func Printf

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

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

func RegistPrinter

func RegistPrinter(id string, lang language.Tag)

func Sprintf

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

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

func Update

func Update(id, srcFile, destFile string) error

Update messages

Types

type Message

type Message map[string]string

Message is translation message

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

Jump to

Keyboard shortcuts

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