File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,9 +97,16 @@ func InitWithLocale(locale string) *goi18n.Localizer {
9797
9898 bundle := goi18n .NewBundle (language .English )
9999 bundle .RegisterUnmarshalFunc ("json" , json .Unmarshal )
100- bundle .LoadMessageFileFS (LocaleFS , "v2Resources/active.en-US.json" )
100+ err := bundle .LoadMessageFileFS (LocaleFS , "v2Resources/active.en-US.json" )
101+ if err != nil {
102+ fmt .Printf ("Unable to load language from v2Resources/active.en-US.json\n " , lang_file )
103+ }
101104 if locale != "en_US" {
102- bundle .LoadMessageFileFS (LocaleFS , fmt .Sprintf ("v2Resources/active.%s.json" , locale ))
105+ lang_file := fmt .Sprintf ("v2Resources/active.%s.json" , locale )
106+ err = bundle .LoadMessageFileFS (LocaleFS , lang_file )
107+ if err != nil {
108+ fmt .Printf ("Unable to load language from %s\n " , lang_file )
109+ }
103110 }
104111 loc := goi18n .NewLocalizer (bundle , locale )
105112 return loc
You can’t perform that action at this time.
0 commit comments