diff options
author | Mark Kopenga <mkopenga@gmail.com> | 2018-08-14 12:56:11 +0200 |
---|---|---|
committer | Mark Kopenga <mkopenga@gmail.com> | 2018-08-14 12:56:11 +0200 |
commit | 6e518142b48f70fc63b0c72d00754733accd23f2 (patch) | |
tree | 26ee06fe5f3183d79c68c4311589f8507194b84a /pkg/i18n/i18n.go | |
parent | 0c39347224335998fd38cdad2feb23f55d3a5516 (diff) |
added some commands
Diffstat (limited to 'pkg/i18n/i18n.go')
-rw-r--r-- | pkg/i18n/i18n.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/i18n/i18n.go b/pkg/i18n/i18n.go index ffd77fde6..a62f50c1e 100644 --- a/pkg/i18n/i18n.go +++ b/pkg/i18n/i18n.go @@ -9,12 +9,16 @@ import ( // the function to setup the localizer func getlocalizer() *i18n.Localizer { + // detect the user's language userLang, _ := jibber_jabber.DetectLanguage() + + // create a i18n bundle that can be used to add translations and other things var i18nObject = &i18n.Bundle{DefaultLanguage: language.English} // add translation file(s) i18nObject = addDutch(i18nObject) + // return the new localizer that can be used to translate text return i18n.NewLocalizer(i18nObject, userLang) } |