localization

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LanguagePack

type LanguagePack interface {
	Translate(original string, destLanguage enum.Language) (ok bool, result string)
	Pack() MultipleLanguagePack
}

LanguagePack 语言包接口

func NewLanguagePack

func NewLanguagePack(translations map[enum.Language]map[string]string) LanguagePack

type MultipleLanguagePack

type MultipleLanguagePack struct {
	Languages          map[enum.Language]map[string]string `json:"languages"`
	SupportedLanguages []enum.Language                     `json:"supported_languages"`
}

Jump to

Keyboard shortcuts

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