i18n

package
v0.0.0-...-688b8c7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllFrontend

func GetAllFrontend(r *http.Request) map[string]string

GetAllFrontend is used to get all frontend PO strings.

func GetWithRequest

func GetWithRequest(r *http.Request, s string) string

GetWithRequest is used to get an i18n string with the http request.

func Setup

func Setup(dev bool)

Setup is used to initialize the i18n engine. Should only be called once.

Types

type Locale

type Locale struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

Locale is used to define a locale.

func GetLocales

func GetLocales() []Locale

GetLocales is used to get all the supported i18n locales and their names in their respective languages.

Jump to

Keyboard shortcuts

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