+func initLocalizer(lang string) {
+ fsys, _ := fs.Sub(locales, "locale")
+ bundle, err := spreak.NewBundle(
+ spreak.WithSourceLanguage(language.English),
+ spreak.WithDomainFs(spreak.NoDomain, fsys),
+ spreak.WithLanguage(language.Russian),
+ )
+ if err != nil {
+ log.Fatalln(err)
+ }
+ if lang == "" {
+ lang = language.English.String()
+ }
+ localizer = spreak.NewLocalizer(bundle, language.MustParse(lang))
+}
+