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