zitadel/internal/query/languages.go
Fabi 01501c5087
feat: iam query (#3085)
* fix: only show factors with state ready

* fix: get iam by id and clean up code

* fix: get iam by id and clean up code

* fix: remove unused code
2022-01-21 14:01:25 +01:00

22 lines
479 B
Go

package query
import (
"context"
"github.com/caos/logging"
"github.com/caos/zitadel/internal/i18n"
"golang.org/x/text/language"
)
func (q *Queries) Languages(ctx context.Context) ([]language.Tag, error) {
if len(q.supportedLangs) == 0 {
langs, err := i18n.SupportedLanguages(q.LoginDir)
if err != nil {
logging.Log("ADMIN-tiMWs").WithError(err).Debug("unable to parse language")
return nil, err
}
q.supportedLangs = langs
}
return q.supportedLangs, nil
}