feat: modernized web application
This commit is contained in:
22
nextjs/src/i18n/client.ts
Normal file
22
nextjs/src/i18n/client.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
'use client';
|
||||
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
import en from './en.json';
|
||||
import ja from './ja.json';
|
||||
|
||||
if (!i18n.isInitialized) {
|
||||
i18n.use(initReactI18next).init({
|
||||
fallbackLng: 'ja',
|
||||
resources: {
|
||||
en: { translation: en },
|
||||
ja: { translation: ja },
|
||||
},
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user