i18n

package
v0.0.0-...-dd062b7 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Language

type Language struct {
	Sections map[string]*Section
}

func LoadFile

func LoadFile(filename string) (*Language, error)

func (*Language) S

func (this *Language) S(sectionString string) *Section

type Section

type Section struct {
	Text     map[string]string `json:"T"`
	Errors   map[string]string `json:"error"`
	Messages map[string]string `json:"message"`
}

func (*Section) Error

func (this *Section) Error(id string) error

func (*Section) Errorf

func (this *Section) Errorf(id string, a ...interface{}) error

func (*Section) FormatError

func (this *Section) FormatError(err error) utils.Message

func (*Section) FormattedError

func (this *Section) FormattedError(id string) utils.Message

func (*Section) FormattedErrorf

func (this *Section) FormattedErrorf(id string, a ...interface{}) utils.Message

func (*Section) Info

func (this *Section) Info(text string) utils.Message

func (*Section) Infof

func (this *Section) Infof(text string, a ...interface{}) utils.Message

func (*Section) Message

func (this *Section) Message(t string, text string) utils.Message

func (*Section) Messagef

func (this *Section) Messagef(t string, id string, a ...interface{}) utils.Message

func (*Section) Success

func (this *Section) Success(text string) utils.Message

func (*Section) Successf

func (this *Section) Successf(text string, a ...interface{}) utils.Message

func (*Section) T

func (this *Section) T(a ...interface{}) string

type SectionFunc

type SectionFunc func(string) *Section

Jump to

Keyboard shortcuts

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