Documentation ¶
Index ¶
- type Goi18n
- func (g *Goi18n) GetDescriptionByIndex(index int) string
- func (g *Goi18n) GetDescriptionByLang(lang string) string
- func (g *Goi18n) GetLangByIndex(index int) string
- func (g *Goi18n) GetLanguageLength() int
- func (g *Goi18n) IndexLang(lang string) int
- func (g *Goi18n) IsExist(lang string) bool
- func (g *Goi18n) ListLangDescs() []string
- func (g *Goi18n) ListLangs() []string
- func (g *Goi18n) Reload(langs ...string) error
- func (g *Goi18n) SetLangDesc(lang string, desc string)
- func (g *Goi18n) SetLanguage(lang string, desc string) bool
- func (g *Goi18n) T(key string) string
- func (g *Goi18n) Translate(lang string, key string) string
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Goi18n ¶
type Goi18n struct {
// contains filtered or unexported fields
}
Goi18n is a struct for i18n.
func (*Goi18n) GetDescriptionByIndex ¶
GetLangDescByIndex Get language description by index id.
func (*Goi18n) GetDescriptionByLang ¶
GetLangDescByLang Get language description by language.
func (*Goi18n) GetLangByIndex ¶
GetLangByIndex Get language by index id.
func (*Goi18n) GetLanguageLength ¶
GetLanguageLength returns the length of languages.
func (*Goi18n) ListLangDescs ¶
ListLangDescs returns all language descriptions.
func (*Goi18n) SetLangDesc ¶
SetLangDesc sets the language description.
func (*Goi18n) SetLanguage ¶
SetLanguage sets the language.
Click to show internal directories.
Click to hide internal directories.