Translate translates the key to the current language of the context
(ctx *GinContext, key string)
| 220 | |
| 221 | // Translate translates the key to the current language of the context |
| 222 | func Translate(ctx *GinContext, key string) string { |
| 223 | return translator.Tr(handler.GetLangByCtx(ctx), key) |
| 224 | } |
| 225 | |
| 226 | // TranslateWithData translates the key to the language with data |
| 227 | func TranslateWithData(lang i18n.Language, key string, data any) string { |
no test coverage detected