feat: init i18n
This commit is contained in:
22
web/src/i18n/i18n.js
Normal file
22
web/src/i18n/i18n.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
|
||||
import enTranslation from './locales/en.json';
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources: {
|
||||
en: {
|
||||
translation: enTranslation
|
||||
}
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false
|
||||
}
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
1183
web/src/i18n/locales/en.json
Normal file
1183
web/src/i18n/locales/en.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@ import { ThemeProvider } from './context/Theme';
|
||||
import FooterBar from './components/Footer';
|
||||
import { StyleProvider } from './context/Style/index.js';
|
||||
import PageLayout from './components/PageLayout.js';
|
||||
import './i18n/i18n.js';
|
||||
|
||||
// initialization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user