i18n

package
v0.0.0-...-f3a3c3f Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchLocale

func FetchLocale(ctx context.Context) (*i18n.Locale, bool)

func FindLangDefault

func FindLangDefault(r *http.Request) (lang string)

Types

type FindLangFunc

type FindLangFunc func(r *http.Request) (lang string)

type I18nPlug

type I18nPlug struct {
	// contains filtered or unexported fields
}

func New

func New(localeDir string, f FindLangFunc) (p *I18nPlug, err error)

func (*I18nPlug) Plug

func (p *I18nPlug) Plug(h xrest.Handler) xrest.Handler

func (*I18nPlug) ServeHTTP

func (p *I18nPlug) ServeHTTP(ctx context.Context, w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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