Go-i18n is a internationalization library for golang using the i18next json format.
- named intermediates
To install this package, run:
go get github.com/nimbusec-oss/go-i18n
Load translations
t, err := i18n.NewTranslations("<dir>", "en").Load()
Add to FuncMap
template.FuncMap{"T":t.GenerateDefaultTranslate(),}
Use in template
{{ T "<translationKey>" }}