1
0
mirror of https://github.com/zitadel/zitadel.git synced 2024-12-24 08:41:33 +00:00
Florian Forster fa9f581d56
chore(v2): move to new org ()
* chore: move to new org

* logging

* fix: org rename caos -> zitadel

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
2022-04-26 23:01:45 +00:00

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
}