682 B
682 B
Internationalisation for Kingpin
Kingpin uses go-1i8n to provide internationalisation.
Adding a language
- Follow the go-18n instructions here to add a new language.
- Once translated, place the
<lang>.all.jsonfile in this directory. - Edit
kingpin/i18n_init.go:- Add a new
//go:generateline for your language. - Add a new
i18n.ParseTranslationFileBytes()entry toinitI18N(), for your language.
- Add a new
- Run
go generate -x .from the top-level kingpin directory. - Add a test to
kingpin/i18n_init_test.go.
Note that templates are not currently translated.