mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
33 lines
647 B
TypeScript
33 lines
647 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',
|
|
'options',
|
|
'unifiedcanvas',
|
|
'gallery',
|
|
'toast',
|
|
'hotkeys',
|
|
'settings',
|
|
'modelmanager',
|
|
],
|
|
backend: {
|
|
loadPath: '/locales/{{ns}}/{{lng}}.json',
|
|
},
|
|
interpolation: {
|
|
escapeValue: false,
|
|
},
|
|
returnNull: false,
|
|
});
|
|
|
|
export default i18n;
|