f88b4656a1
Multi language for User package
13 lignes
Pas d'EOL
272 o
Go
13 lignes
Pas d'EOL
272 o
Go
package languages
|
|
|
|
import (
|
|
"github.com/nicksnyder/go-i18n/i18n"
|
|
"html/template"
|
|
)
|
|
|
|
func SetTranslation(language string, template *template.Template) {
|
|
T, _ := i18n.Tfunc(language)
|
|
template.Funcs(map[string]interface{}{
|
|
"T": T,
|
|
})
|
|
} |