We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3aba757 commit eaea501Copy full SHA for eaea501
1 file changed
i18n/i18n.go
@@ -29,6 +29,11 @@ var (
29
availableLocales map[string]string
30
)
31
32
+func init() {
33
+ // initialize package with english as default to prevent panics when global state was not already initialized
34
+ Init(language.English.String())
35
+}
36
+
37
// Init initializes the i18n bundle, discovers available locales, and sets the default language.
38
func Init(defaultLang string) {
39
bundle = i18n.NewBundle(language.English) // English is the fallback
0 commit comments