MCPcopy
hub / github.com/apache/answer / MakeTranslator

Function MakeTranslator

plugin/plugin.go:241–246  ·  view source on GitHub ↗

MakeTranslator generates a translator from the key

(key string)

Source from the content-addressed store, hash-verified

239
240// MakeTranslator generates a translator from the key
241func MakeTranslator(key string) Translator {
242 t := func(ctx *GinContext) string {
243 return Translate(ctx, key)
244 }
245 return Translator{Fn: t}
246}
247
248// Translate translates the key to the current language of the context
249func (t Translator) Translate(ctx *GinContext) string {

Callers 1

InfoMethod · 0.92

Calls 1

TranslateFunction · 0.85

Tested by 1

InfoMethod · 0.74