i18n

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Internationalization

Index

Constants

This section is empty.

Variables

View Source
var (
	TimezoneNames = map[Timezone]string{
		1:  "Development",
		2:  "United States",
		3:  "Oceanic",
		4:  "Latin America",
		5:  "Tournament",
		6:  "Korea",
		7:  "Tournament 1",
		8:  "English",
		9:  "German",
		10: "French",
		11: "Spanish",
		12: "Russian",
		13: "Tournament 2",
		14: "Taiwan",
		15: "Tournament 3",
		16: "China",
		17: "CN1",
		18: "CN2",
		19: "CN3",
		20: "CN4",
		21: "CN5",
		22: "CN6",
		23: "CN7",
		24: "CN8",
		25: "Tournament 4",
		26: "Test Server",
		27: "Tournament 5",
		28: "QA Server",
		29: "CN9",
		30: "Test Server 2",
		31: "CN10",
		32: "CTC",
		33: "CNC",
		34: "CN1/4",
		35: "CN/2/6/9",
		36: "CN3/7",
		37: "Russian Tournament",
		38: "CN5/8",
		39: "CN11",
		40: "CN12",
		41: "CN13",
		42: "CN14",
		43: "CN15",
		44: "CN16",
		45: "CN17",
		46: "CN18",
		47: "CN19",
		48: "CN20",
		49: "Brazil",
		50: "Italian",
		51: "Hyrule",
		52: "QA2 Test",
		53: "",
		54: "",
		55: "Recommended Realm",
		56: "Test",
		57: "Recommended Realm 2",
		58: "",
		59: "Future Test",
	}
)

Functions

This section is empty.

Types

type Locale

type Locale uint8
const (
	English Locale = iota
	Korean
	French
	German
	SimplifiedChinese
	TraditionalChinese
	PeninsularSpanish
	LatinAmericanSpanish
	Russian
	Japanese
	Portuguese
	Italian
	Unk12
	Unk13
	Unk14
	Unk15
	MaxLocale
)

func LocaleFromString

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

func (*Locale) DecodeWord

func (l *Locale) DecodeWord(word string) 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

type Timezone

type Timezone uint32

func (*Timezone) DecodeWord

func (t *Timezone) DecodeWord(str string) error

func (*Timezone) EncodeWord

func (t *Timezone) EncodeWord() (string, error)

func (Timezone) String

func (t Timezone) String() string

Jump to

Keyboard shortcuts

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