build ok,
This commit is contained in:
2
002_source/cms/src/lib/check-is-development.ts
Normal file
2
002_source/cms/src/lib/check-is-development.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
const isDevelopment = process.env.NEXT_PUBLIC_ENVIRONMENT === 'development';
|
||||
export default isDevelopment;
|
@@ -1,12 +1,26 @@
|
||||
import { use } from 'i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import Backend from 'i18next-http-backend';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
// import { reactI18nextModule } from "react-i18next";
|
||||
|
||||
import { logger } from '@/lib/default-logger';
|
||||
|
||||
//
|
||||
// .
|
||||
// .use(detector)
|
||||
// use(detector);
|
||||
export const i18n = use(Backend)
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({ lng: 'en', fallbackLng: 'en', interpolation: { escapeValue: false } })
|
||||
.init({
|
||||
// lng: 'en',
|
||||
// fallbackLng: 'en',
|
||||
debug: true,
|
||||
interpolation: { escapeValue: false },
|
||||
//
|
||||
})
|
||||
.catch((err) => {
|
||||
logger.error('Failed to initialize i18n', err);
|
||||
});
|
||||
|
Reference in New Issue
Block a user