Documentation ¶
Index ¶
- type I18n
- func (i *I18n) ChangeLocale(locale string)
- func (i *I18n) GetPrinterByLocale(localeName string) (*message.Printer, error)
- func (i *I18n) LocalesInit() error
- func (i *I18n) TrPrint(source string) (int, error)
- func (i *I18n) TrPrintln(source string) (int, error)
- func (i *I18n) Trf(source string, param ...interface{}) string
- func (i *I18n) TrfPrint(writer io.Writer, source string) (int, error)
- func (i *I18n) TrfPrintln(writer io.Writer, source string) (int, error)
- func (i *I18n) TrfWriter(writer io.Writer, source string, param ...interface{}) (int, error)
- type Opt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type I18n ¶
type I18n struct {
// contains filtered or unexported fields
}
func (*I18n) ChangeLocale ¶
func (*I18n) GetPrinterByLocale ¶
func (*I18n) LocalesInit ¶
func (*I18n) TrfPrintln ¶
TrfPrintln translate and println the source string with the given writer
type Opt ¶
type Opt func(i *I18n)
func DefaultFallBackLocale ¶
func DefaultLocale ¶
func LocalesDir ¶
Click to show internal directories.
Click to hide internal directories.