Documentation ¶
Index ¶
Constants ¶
View Source
const ( // common msg Success = "common.success" Failed = "common.failed" UpdateSuccess = "common.updateSuccess" UpdateFailed = "common.updateFailed" CreateSuccess = "common.createSuccess" CreateFailed = "common.createFailed" DeleteSuccess = "common.deleteSuccess" DeleteFailed = "common.deleteFailed" ChangeStatusSuccess = "common.changeStatusSuccess" ChangeStatusFailed = "common.changeStatusFailed" TargetNotFound = "common.targetNotExist" DatabaseError = "common.databaseError" RedisError = "common.redisError" AlreadyInit = "init.alreadyInit" InitRunning = "init.initializeIsRunning" // front end msg ApiRequestFailed = "sys.api.apiRequestFailed" )
Variables ¶
View Source
var LocaleFS embed.FS
Functions ¶
This section is empty.
Types ¶
type Translator ¶
type Translator struct {
// contains filtered or unexported fields
}
func (*Translator) MatchLocalizer ¶
func (l *Translator) MatchLocalizer(lang string) *i18n.Localizer
func (*Translator) NewBundle ¶
func (l *Translator) NewBundle(file embed.FS)
func (*Translator) NewTranslator ¶
func (l *Translator) NewTranslator()
func (*Translator) TransError ¶
func (l *Translator) TransError(lang string, err error) error
Click to show internal directories.
Click to hide internal directories.