i18n

package
v0.0.0-...-6e8d5b8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLoc = LoadTranslations()
View Source
var Locales = []Locale{
	"de_de",
	"en_us",
	"es_es",
	"es_mx",
	"fr_fr",
	"it_it",
	"ja_jp",
	"ko_kr",
	"pl_pl",
	"pt_br",
	"ru_ru",
	"th_th",
	"tr_tr",
	"vi_vn",
	"zh_tw",
}

Functions

func AsStringSlice

func AsStringSlice(ls []Locale) []string

Types

type Locale

type Locale string
var Default Locale = "en_us"

func (Locale) Name

func (l Locale) Name() string

type Localizer

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

func LoadTranslations

func LoadTranslations() *Localizer

func (Localizer) Localize

func (l Localizer) Localize(language string, messageID string) string

Jump to

Keyboard shortcuts

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