summaryrefslogtreecommitdiffstats
path: root/pkg/i18n/i18n.go
diff options
context:
space:
mode:
authorMark Kopenga <mkopenga@gmail.com>2018-08-14 12:56:11 +0200
committerMark Kopenga <mkopenga@gmail.com>2018-08-14 12:56:11 +0200
commit6e518142b48f70fc63b0c72d00754733accd23f2 (patch)
tree26ee06fe5f3183d79c68c4311589f8507194b84a /pkg/i18n/i18n.go
parent0c39347224335998fd38cdad2feb23f55d3a5516 (diff)
added some commands
Diffstat (limited to 'pkg/i18n/i18n.go')
-rw-r--r--pkg/i18n/i18n.go4
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)
}