InvokeAI/invokeai/frontend/src/i18n.ts
2023-02-18 15:26:04 +11:00

23 lines
478 B
TypeScript

import i18n from 'i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
import Backend from 'i18next-http-backend';
import { initReactI18next } from 'react-i18next';
i18n
.use(Backend)
.use(LanguageDetector)
.use(initReactI18next)
.init({
fallbackLng: 'en',
debug: false,
backend: {
loadPath: '/locales/{{lng}}.json',
},
interpolation: {
escapeValue: false,
},
returnNull: false,
});
export default i18n;