i18n

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 1 Imported by: 26 modules, 25 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language string
const (
	LanguageChinese            Language = "zh_CN"
	LanguageChineseTraditional Language = "zh_TW"
	LanguageEnglish            Language = "en_US"
	LanguageGerman             Language = "de_DE"
	LanguageSpanish            Language = "es_ES"
	LanguageFrench             Language = "fr_FR"
	LanguageItalian            Language = "it_IT"
	LanguageJapanese           Language = "ja_JP"
	LanguageKorean             Language = "ko_KR"
	LanguagePortuguese         Language = "pt_PT"
	LanguageRussian            Language = "ru_RU"
	LanguageVietnamese         Language = "vi_VN"

	DefaultLanguage = LanguageEnglish
)

func (Language) Abbr

func (t Language) Abbr() string

Abbr get language type abbreviation

type Translator

type Translator interface {
	Tr(lang Language, key string) string
	TrWithData(lang Language, key string, templateData any) string
	Dump(lang Language) ([]byte, error)
}

Jump to

Keyboard shortcuts

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