mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-22 02:11:29 +00:00
Added localization for the Self Serve Model (#406)
* added localization for selfserve model * added comment * addressed PR comments * fixed format errors * Addressed PR comments
This commit is contained in:
committed by
GitHub
parent
f8ede0cc1e
commit
6aaddd9c60
31
src/i18n.ts
Normal file
31
src/i18n.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import i18n from "i18next";
|
||||
import LanguageDetector from "i18next-browser-languagedetector";
|
||||
import { initReactI18next } from "react-i18next";
|
||||
import XHR from "i18next-http-backend";
|
||||
import EnglishTranslations from "./Localization/en/translations.json";
|
||||
|
||||
i18n
|
||||
.use(XHR)
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources: {
|
||||
en: EnglishTranslations,
|
||||
},
|
||||
fallbackLng: "en",
|
||||
detection: { order: ["navigator", "cookie", "localStorage", "sessionStorage", "querystring", "htmlTag"] },
|
||||
debug: process.env.NODE_ENV === "development",
|
||||
ns: ["translations"],
|
||||
defaultNS: "translations",
|
||||
keySeparator: ".",
|
||||
interpolation: {
|
||||
formatSeparator: ",",
|
||||
},
|
||||
react: {
|
||||
wait: true,
|
||||
bindI18n: "languageChanged loaded",
|
||||
bindI18nStore: "added removed",
|
||||
nsMode: "default",
|
||||
useSuspense: false,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user