languages

package
v0.0.0-...-5607d3c Latest Latest
Warning

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

Go to latest
Published: May 13, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailableLanguages

func GetAvailableLanguages() (languages map[string]string)

func GetTfuncAndLanguageFromRequest

func GetTfuncAndLanguageFromRequest(r *http.Request, defaultLanguage string) (T i18n.TranslateFunc, Tlang *language.Language)

func SetTranslationFromRequest

func SetTranslationFromRequest(tmpl *template.Template, r *http.Request, defaultLanguage string) i18n.TranslateFunc

func TfuncAndLanguageWithFallback

func TfuncAndLanguageWithFallback(language string, languages ...string) (i18n.TranslateFunc, *language.Language, error)

When go-i18n finds a language with >0 translations, it uses it as the Tfunc However, if said language has a missing translation, it won't fallback to the "main" language

Types

This section is empty.

Jump to

Keyboard shortcuts

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