feat(admin-ui): Add display name + pull supported languages from config (#5028)

This commit is contained in:
Oli Juhl
2023-09-13 09:45:26 +02:00
committed by GitHub
parent 05fcfd803e
commit d4432dd183
3 changed files with 21 additions and 6 deletions
+11 -3
View File
@@ -1,7 +1,14 @@
import i18n from "i18next"
import { initReactI18next } from "react-i18next"
import Backend from "i18next-http-backend"
import LanguageDetector from "i18next-browser-languagedetector"
import Backend from "i18next-http-backend"
import { initReactI18next } from "react-i18next"
export const supportedLanguages = [
{
locale: "en",
name: "English",
},
]
void i18n
.use(Backend)
@@ -9,7 +16,8 @@ void i18n
.use(initReactI18next)
// https://www.i18next.com/overview/configuration-options
.init({
fallbackLng: ["en"],
supportedLngs: supportedLanguages.map((l) => l.locale),
fallbackLng: "en",
returnNull: false,
debug: true,
interpolation: {