i18n

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatDate

func FormatDate(date time.Time, format string, translation map[string]string) string

func GetErrorData

func GetErrorData(code int, translation Translation, part string) string

func LoadServerLangs

func LoadServerLangs()

func Match

func Match(acceptLanguages []language.Tag) string

func RenderAsciiDoc

func RenderAsciiDoc(asciidoc string) template.HTML

Types

type Translation

type Translation struct {
	Global    map[string]string
	Index     map[string]string
	Search    map[string]string
	Film      map[string]string
	Serie     map[string]string
	Person    map[string]string
	Book      map[string]string
	BookSerie map[string]string
	About     map[string]string
	Error     map[string]string
}

func LoadStrings

func LoadStrings(language string) (Translation, error)

Jump to

Keyboard shortcuts

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