lang

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 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, lang 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