InvokeAI/invokeai/frontend/src/i18n.ts
Lincoln Stein 9ad4c03277 Various fixes
1) Downgrade numpy to avoid dependency conflict with numba
2) Move all non ldm/invoke files into `invokeai`. This includes assets, backend, frontend, and configs.
3) Fix up way that the backend finds the frontend and the generator finds the NSFW caution.png icon.
2023-01-30 18:42:17 -05:00

34 lines
664 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,
ns: [
'common',
'gallery',
'hotkeys',
'options',
'settings',
'modelmanager',
'toast',
'tooltip',
'unifiedcanvas',
],
backend: {
loadPath: '/locales/{{ns}}/{{lng}}.json',
},
interpolation: {
escapeValue: false,
},
returnNull: false,
});
export default i18n;