2021-07-13 05:13:39 +00:00
|
|
|
package auth
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-04-26 23:01:45 +00:00
|
|
|
"github.com/zitadel/zitadel/internal/api/grpc/text"
|
|
|
|
auth_pb "github.com/zitadel/zitadel/pkg/grpc/auth"
|
2021-07-13 05:13:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func (s *Server) GetSupportedLanguages(ctx context.Context, req *auth_pb.GetSupportedLanguagesRequest) (*auth_pb.GetSupportedLanguagesResponse, error) {
|
2022-01-21 13:01:25 +00:00
|
|
|
langs, err := s.query.Languages(ctx)
|
2021-07-13 05:13:39 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return &auth_pb.GetSupportedLanguagesResponse{Languages: text.LanguageTagsToStrings(langs)}, nil
|
|
|
|
}
|