translator

package
v2.0.23 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTranslator

func GetTranslator(acceptLang string) ut.Translator

func RegisterValidatorTranslation added in v2.0.4

func RegisterValidatorTranslation(acceptLang Language, tag, text string, override bool) (string, ut.Translator, validator.RegisterTranslationsFunc, validator.TranslationFunc)

func SetValidateTranslators

func SetValidateTranslators(validate *validator.Validate)

Types

type Language

type Language string
const (
	RU Language = "ru"
	EN Language = "en"
)

type Translate

type Translate map[Language]string

func (Translate) Translate

func (t Translate) Translate(acceptLang string, args ...any) string

Jump to

Keyboard shortcuts

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