translator

package
v0.0.0-...-a4f8eeb Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Translator *i18n.Bundle // skynet i18n

Functions

func New

func New()

func NewLocalizer

func NewLocalizer(lang ...string) *i18n.Localizer

func TranslateString

func TranslateString(t *i18n.Localizer, s string) string

TranslateString translate string to target language. If error happened, return untranslated string.

func TranslateTpl

func TranslateTpl(t *i18n.Localizer, s string, tpl any) string

TranslateTpl translate string and template to target language. If error happened, return untranslated string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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