-class LanguageDetector {
- static readonly type = "languageDetector";
-
- detect() {
- const langs: string[] = [];
-
- const myLang =
- UserService.Instance.myUserInfo?.local_user_view.local_user
- .interface_language ?? "browser";
-
- if (myLang !== "browser") langs.push(myLang);
-
- if (isBrowser()) langs.push(...navigator.languages);
-
- return langs;
- }
-}
-
-i18next.use(LanguageDetector).init({