i18n

package
v0.0.0-...-f683377 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundle

type Bundle struct {
	*i18n.Bundle
}

func Init

func Init() (*Bundle, error)

Initialize the i18n process.

func (*Bundle) Localizer

func (b *Bundle) Localizer(langs ...string) *Localizer

Returns a new localizer.

func (*Bundle) Tags

func (b *Bundle) Tags() []string

Get the language tags loaded.

type Localizer

type Localizer struct {
	*i18n.Localizer
}

func (*Localizer) Localize

func (l *Localizer) Localize(id string) string

Translate ("localize") an message idientified by an id into a string.

Jump to

Keyboard shortcuts

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