lang

package
v0.0.0-...-c11c497 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Translator

type Translator struct {
	Bundle    *i18n.Bundle
	Localizer *i18n.Localizer
	Langs     []string
}

func GetTranslator

func GetTranslator() *Translator

func LoadLanguages

func LoadLanguages(langFile string, langs ...string) Translator

func (Translator) Localize

func (lm Translator) Localize(messageID string, langs ...string) string

func (Translator) LocalizeTemplate

func (lm Translator) LocalizeTemplate(messageID string, template map[string]string, langs ...string) string

Jump to

Keyboard shortcuts

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