locale

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LocalizerWeb *i18n.Localizer
	LocalizerBot *i18n.Localizer
)

Functions

func I18n

func I18n(i18nType I18nType, key string, params ...string) string

func InitLocalizer

func InitLocalizer(i18nFS embed.FS, settingService SettingService) error

func LocalizerMiddleware

func LocalizerMiddleware() gin.HandlerFunc

Types

type I18nType

type I18nType string
const (
	Bot I18nType = "bot"
	Web I18nType = "web"
)

type SettingService

type SettingService interface {
	GetTgLang() (string, error)
}

Jump to

Keyboard shortcuts

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