lang

package
v0.0.0-...-925651e Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Translations

type Translations struct {
	// contains filtered or unexported fields
}

func Load

func Load(languages_data map[string]map[string]string) *Translations

func (Translations) Direct

func (t Translations) Direct(lang string, key string, values map[string]string) string

func (Translations) Get

func (t Translations) Get(key string, values map[string]string) string

T translates based on the default language inside .env or if not givem or such not loaded

func (*Translations) SetLanguage

func (t *Translations) SetLanguage(language string) *Translations

Jump to

Keyboard shortcuts

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