Documentation
¶
Index ¶
- func GetAvailableLanguages() (languages map[string]string)
- func GetTfuncAndLanguageFromRequest(r *http.Request, defaultLanguage string) (T i18n.TranslateFunc, Tlang *language.Language)
- func SetTranslationFromRequest(tmpl *template.Template, r *http.Request, defaultLanguage string) i18n.TranslateFunc
- func TfuncAndLanguageWithFallback(language string, languages ...string) (i18n.TranslateFunc, *language.Language, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAvailableLanguages ¶
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.
Click to show internal directories.
Click to hide internal directories.