i18n

package
v0.0.0-...-acda5ee Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocale

func GetLocale(ctx context.Context) string

GetLocale returns the locale defined in context If it is not defined, the environment locale is used

func IsValidLocale

func IsValidLocale(locale string) bool

IsValidLocale returns true if given locale is valid

func T

func T(ctx context.Context, key string, params ...Params) string

T translates a given key to current locale Params is used to replace variables and pluralize

Types

type Params

type Params map[string]any

Jump to

Keyboard shortcuts

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