i18n

package
v0.0.0-...-382259f Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: GPL-3.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locale

type Locale uint8
const (
	English Locale = iota
	Korean
	French
	German
	SimplifiedChinese
	TraditionalChinese
	PeninsularSpanish
	LatinAmericanSpanish
	Russian
	PeninsularPortuguese
	BrazilianPortugese
	Italian
	MaxLocale
)

func LocaleFromString

func LocaleFromString(text string) (l Locale, err error)

func (Locale) DecodeWord

func (l Locale) DecodeWord(out reflect.Value, word string) (err error)

Note: refers to the Locale identifier, not the encoding of text in the language.

func (Locale) EncodeWord

func (l Locale) EncodeWord() (string, error)

func (Locale) String

func (l Locale) String() string

type Text

type Text map[Locale]string

func GetEnglish

func GetEnglish(str string) Text

func (Text) GetLocalized

func (str Text) GetLocalized(locale Locale) string

func (Text) String

func (str Text) String() string

Jump to

Keyboard shortcuts

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