Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
Bundle bundle translations
func (*Bundle) Get ¶
func (b *Bundle) Get(id string) (translation *Translation, found bool)
Get translation by id
func (*Bundle) MustGet ¶
func (b *Bundle) MustGet(id string) *Translation
MustGet translation, if not exists then panic
type Content ¶
type Content struct {
// contains filtered or unexported fields
}
Content for specified language
type Language ¶
type Language string
const ( // ZhCN Chinese for China Mainland ZhCN Language = "Zh-CN" // EnUS English EnUS = "En-US" )
type Translation ¶
type Translation struct {
// contains filtered or unexported fields
}
Translation represents a content for some language.
func (*Translation) Content ¶
func (t *Translation) Content(lang Language) (content *Content, ok bool)
Content get content by language
func (*Translation) Languages ¶
func (t *Translation) Languages() []Language
Languages list all languages of the translation
Click to show internal directories.
Click to hide internal directories.