mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-23 16:27:35 +00:00
fa9f581d56
* chore: move to new org * logging * fix: org rename caos -> zitadel Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
23 lines
486 B
Go
23 lines
486 B
Go
package query
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/zitadel/logging"
|
|
"golang.org/x/text/language"
|
|
|
|
"github.com/zitadel/zitadel/internal/i18n"
|
|
)
|
|
|
|
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
|
|
}
|