Add supplier and imporve inventory frontend
This commit is contained in:
38
frontend/src/i18n/index.ts
Normal file
38
frontend/src/i18n/index.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
// frontend/src/i18n/index.ts
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import { resources, defaultLanguage } from '../locales';
|
||||
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources,
|
||||
lng: defaultLanguage,
|
||||
fallbackLng: defaultLanguage,
|
||||
|
||||
interpolation: {
|
||||
escapeValue: false, // React already does escaping
|
||||
},
|
||||
|
||||
// Enable debug in development
|
||||
debug: process.env.NODE_ENV === 'development',
|
||||
|
||||
// Default namespace
|
||||
defaultNS: 'common',
|
||||
|
||||
// Fallback namespace
|
||||
fallbackNS: 'common',
|
||||
|
||||
// Key separator for nested keys
|
||||
keySeparator: '.',
|
||||
|
||||
// Namespace separator
|
||||
nsSeparator: ':',
|
||||
|
||||
// React options
|
||||
react: {
|
||||
useSuspense: false,
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user