zitadel/internal/api/grpc/admin/language.go
Fabi 03a38fbf1c
feat: Custom message files (#1992)
* feat: add get custom message text to admin api

* feat: read custom message texts from files

* feat: get languages in apis

* feat: get languages in apis

* feat: get languages in apis

* feat: pr feedback

* feat: docs

* feat: merge main
2021-07-13 07:13:39 +02:00

17 lines
470 B
Go

package admin
import (
"context"
"github.com/caos/zitadel/internal/api/grpc/text"
admin_pb "github.com/caos/zitadel/pkg/grpc/admin"
)
func (s *Server) GetSupportedLanguages(ctx context.Context, req *admin_pb.GetSupportedLanguagesRequest) (*admin_pb.GetSupportedLanguagesResponse, error) {
langs, err := s.iam.Languages(ctx)
if err != nil {
return nil, err
}
return &admin_pb.GetSupportedLanguagesResponse{Languages: text.LanguageTagsToStrings(langs)}, nil
}