i18n

package
v0.1.64 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fprintf

func Fprintf[T any](w io.Writer, ctx T, key string, args ...any) (n int, resErr error)

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

func Make

func Make(lang any) *i18n.Printer

Make is make language printer

func NewPrinter

func NewPrinter(lang any) *i18n.Printer

NewPrinter is new printer

func Plural

func Plural(cases ...any) []i18n.PluralRule

Plural is plural

func Printf

func Printf[T any](ctx T, format string, args ...any)

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

func SetLang

func SetLang(lang any) *i18n.Printer

SetLang set language

func Sprintf

func Sprintf[T any](ctx T, format string, args ...any) (result string)

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

Types

type Domain

type Domain = i18n.Domain

Domain is domain

type Message added in v0.1.38

type Message = i18n.Message

Domain is domain

type PluralRule added in v0.1.38

type PluralRule = i18n.PluralRule

Domain is domain

type Printer added in v0.1.38

type Printer = i18n.Printer

Domain is domain

Jump to

Keyboard shortcuts

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