Versions in this module Expand all Collapse all v1 v1.0.1 Jul 22, 2017 Changes in this version + func Flag(languageCode string, parent bool) string + func GetDefaultLanguage() string + func GetDefaultTfunc() (i18n.TranslateFunc, error) + func GetMascotFromRequest(c *gin.Context) string + func GetMascotUrlFromRequest(c *gin.Context) string + func GetParentTag(languageTag string) glang.Tag + func GetTfuncAndLanguageFromRequest(c *gin.Context) (T i18n.TranslateFunc, Tlang *language.Language) + func GetThemeFromRequest(c *gin.Context) string + func InitI18n(conf config.I18nConfig, retriever UserRetriever) error + func TfuncAndLanguageWithFallback(language string, languages ...string) (i18n.TranslateFunc, *language.Language, error) + func Translate(languageCode string, to string) string + type Language struct + Code string + Name string + Tag string + func (lang *Language) Flag(national bool) string + func (lang *Language) Translate(languageCode template.HTML) string + type Languages []Language + func GetAvailableLanguages() Languages + func ParseLanguages(codes []string) Languages + func (langs Languages) Exist(name string) bool + type TemplateTfunc func(string, ...interface{}) template.HTML + func GetTfuncFromRequest(c *gin.Context) TemplateTfunc + type UserRetriever interface + RetrieveCurrentUser func(c *gin.Context) (*models.User, error)