translator

package
v1.4.1-0...-415649e Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultTrasnlate

func DefaultTrasnlate(content *TT) string

DefaultTrasnlate 默认翻译 content: 翻译内容

func Init

func Init()

func Trasnlate

func Trasnlate(ctx *gin.Context, content *TT) string

Trasnlate 翻译 ctx: gin上下文 content: 翻译内容

func UseValidatori18n

func UseValidatori18n() gin.HandlerFunc

func ValiadteTransErr

func ValiadteTransErr(ctx *gin.Context, err error) error

Types

type TT

type TT struct {
	ID string      // 语言ID
	TD interface{} // 模板数据TemplateData
	PC int         // 复数PluralCount
}

TT 翻译模板

Jump to

Keyboard shortcuts

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