i18n

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 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 any, key string, args ...any) (n int, resErr error)

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

func Make

func Make(lang any) context.Context

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(ctx any, 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(ctx any, 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

Jump to

Keyboard shortcuts

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