i18n

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const TranslatorContextKey = "translator"

Variables

This section is empty.

Functions

func SetTranslatorMiddleware

func SetTranslatorMiddleware() func(echo.HandlerFunc) echo.HandlerFunc

func TranslateContent

func TranslateContent(locale string, cs problems.Contents) problems.LocalizedData

Types

type Translator

type Translator struct {
	ID         string
	LocaleName string
	// contains filtered or unexported fields
}

func Get

func Get(id string) (Translator, bool)

func (Translator) Translate

func (t Translator) Translate(key message.Reference, args ...interface{}) string

func (Translator) TranslateContent

func (t Translator) TranslateContent(cs problems.Contents) problems.LocalizedData

Jump to

Keyboard shortcuts

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