mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
01501c5087
* 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
22 lines
479 B
Go
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
|
|
}
|