html

package
Version: v0.0.0-...-837f7d2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Error                = parse("error.html")
	CustOrder            = parse("customer/order.html")
	CustPurchase         = parse("customer/purchase.html")
	StaffIndex           = parse("staff.html", "staff/index.html")
	StaffMarkPaid        = parse("staff.html", "staff/mark-paid.html")
	StaffMarkPaidConfirm = parse("staff.html", "staff/mark-paid-confirm.html")
	StaffLogin           = parse("staff/login.html")
	StaffSelect          = parse("staff.html", "staff/select.html")
	StaffUploadImage     = parse("staff.html", "staff/upload-image.html")
	StaffUploadText      = parse("staff.html", "staff/upload-text.html")
)

Functions

func IsCountryCode

func IsCountryCode(s string) bool

Types

type IDName

type IDName struct {
	ID   string
	Name string // sort by name
}

type Language

type Language string

Language is any string. It will be matched by golang.org/x/text/language.Make and golang.org/x/text/language.NewMatcher.

func GetLanguage

func GetLanguage(r *http.Request) Language

GetLanguage returns the "lang" GET parameter or, if not present, the Accept-Language header value. No matching is performed.

func (Language) Translate

func (lang Language) Translate(key string, args ...interface{}) string

func (Language) TranslateEUCountries

func (lang Language) TranslateEUCountries() []IDName

type TagStr

type TagStr struct {
	Tag language.Tag
	Str string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL