✨ add i18n support
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"schisandra-album-cloud-microservices/app/auth/internal/svc"
|
||||
"schisandra-album-cloud-microservices/app/auth/internal/types"
|
||||
"schisandra-album-cloud-microservices/common/i18n"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
@@ -25,6 +26,10 @@ func NewAccountLoginLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Acco
|
||||
|
||||
func (l *AccountLoginLogic) AccountLogin(req *types.AccountLoginRequest) (resp *types.LoginResponse, err error) {
|
||||
// todo: add your logic here and delete this line
|
||||
i18n.IsHasI18n(l.ctx)
|
||||
text := i18n.FormatText(l.ctx, "user.name", "landaiqing")
|
||||
|
||||
return
|
||||
return &types.LoginResponse{
|
||||
AccessToken: text,
|
||||
}, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user