i18n

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Languages = make([]string, 0)
View Source
var Templates = make(map[string]*Template)

Functions

func Init

func Init(dir string) error

Types

type Template

type Template struct {
	Text   *TemplateText   `mapstructure:"text"`
	Button *TemplateButton `mapstructure:"button"`
}

type TemplateButton

type TemplateButton struct {
	Back   tele.InlineButton `mapstructure:"back"`
	Search struct {
		Next        tele.InlineButton `mapstructure:"next"`
		Prev        tele.InlineButton `mapstructure:"prev"`
		SwitchOrder tele.InlineButton `mapstructure:"switch_order"`
	} `mapstructure:"search"`
	Start struct {
		Settings tele.InlineButton `mapstructure:"settings"`
	} `mapstructure:"start"`
	Settings struct {
		Language      tele.InlineButton `mapstructure:"language"`
		LanguagePlain tele.InlineButton `mapstructure:"language_plain"` // set manually
	} `mapstructure:"settings"`
}

type TemplateText

type TemplateText struct {
	Settings struct {
		Desc     i18n.Text `mapstructure:"desc"`
		Language i18n.Text `mapstructure:"language"`
	} `mapstructure:"settings"`
	Search struct {
		KeywordsTooLong i18n.Text `mapstructure:"keywords_too_long"`
		Results         i18n.Text `mapstructure:"results"`
	} `mapstructure:"search"`
	AddedToGroup struct {
		Fail    i18n.Text `mapstructure:"fail"`
		Success i18n.Text `mapstructure:"success"`
	} `mapstructure:"added_to_group"`
	Start i18n.Text `mapstructure:"start"`
}

Jump to

Keyboard shortcuts

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