func (translator *TranslatorPack) Translate(language string, messageID string) string {
	localizer, err := returnLocalizer(language)
	if err != nil {
		return ""
	}

	return translateLocal(localizer, &i18n.LocalizeConfig{
		MessageID: messageID,
		DefaultMessage: &i18n.Message{
			ID: messageID,
		},
	})
}
// Translates to requested language and if only the language
// is not added before with `loadLanguages` or `Setup` functions,
// `localizer not found` error returns.
//
// You can get your language string code with using "golang.org/x/text/language"
// library like: language.English.String()
Translates to requested language and if only the language
is not added before with `loadLanguages` or `Setup` functions,
`localizer not found` error returns.

You can get your language string code with using "golang.org/x/text/language"
library like: language.English.String()
// Translates to requested language and if only the language // is not added before with ` loadLanguages ` or ` Setup ` functions // ` localizer not found ` error returns . // // You can get your language string code with using " golang . org / x / text / language " // library like : language . English . String ()
func (translator *TranslatorPack) Translate(language string, messageID string) string {
	localizer, err := returnLocalizer(language)
	if err != nil {
		return ""
	}
	return translateLocal(localizer, &i18n.LocalizeConfig{
		MessageID: messageID,
		DefaultMessage: &i18n.Message{
			ID: messageID,
		},
	})
}
func ( translator * TranslatorPack ) Translate ( language string , messageID string ) string { localizer , err := returnLocalizer ( language ) if err != nil { return " " } return translateLocal ( localizer , & i18n . LocalizeConfig { MessageID : messageID , DefaultMessage : & i18n . Message { ID : messageID , } , } ) }
Translates to requested language and if only the language
is not added before with `loadLanguages` or `Setup` functions,
`localizer not found` error returns.
Translates to requested language and if only the language is not added before with ` loadLanguages ` or ` Setup ` functions ` localizer not found ` error returns .