InvokeAI/invokeai/frontend/src/i18n.ts
psychedelicious 9ad76fe80c Updates code quality tooling and formats codebase
- `eslint` and `prettier` configs
- `husky` to format and lint via pre-commit hook
- `babel-plugin-transform-imports` to treeshake `lodash` and other packages if needed

Lints and formats codebase.
2023-02-08 01:53:34 +13:00

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