mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-05 09:42:04 +00:00
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
This commit is contained in:
21
internal/query/languages.go
Normal file
21
internal/query/languages.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user