i18n

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const I18nCtxKey i18nKey = "i18n-ctx"

I18nCtxKey is context key

Variables

This section is empty.

Functions

func Fprintf

func Fprintf(w io.Writer, ctx interface{}, key string, args ...interface{}) (n int, resErr error)

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

func Make

func Make(lang interface{}) context.Context

Make is make language printer

func NewPrinter

func NewPrinter(lang interface{}) *i18n.Printer

NewPrinter is new printer

func Plural

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

Plural is plural

func Printf

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

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

func SetLang

func SetLang(lang interface{}) *i18n.Printer

SetLang set language

func Sprintf

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

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

Types

type Domain

type Domain = i18n.Domain

Domain is domain

Jump to

Keyboard shortcuts

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