i18n

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: AGPL-3.0 Imports: 15 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 FormatDateNice added in v0.3.0

func FormatDateNice(datetime time.Time, strings Translation, timezone string) string

func GetErrorData

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

func LoadServerLangs

func LoadServerLangs() error

func Match

func Match(acceptLanguages []language.Tag) (language.Tag, error)

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
	Signup      map[string]string
	Signedup    map[string]string
	Login       map[string]string
	Loggedout   map[string]string
	Watchlist   map[string]string
	Readlist    map[string]string
	Tvqueue     map[string]string
	Experiences map[string]string
	Error       map[string]string
}

func LoadStrings

func LoadStrings(language language.Tag) (Translation, error)

Jump to

Keyboard shortcuts

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