init commit,
This commit is contained in:
21
03_source/mobile_notworking.del/src/i18n.ts
Normal file
21
03_source/mobile_notworking.del/src/i18n.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import i18n from 'i18next';
|
||||
import Languagedetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import en from './locales/en/en.json';
|
||||
import hk from './locales/hk/hk.json';
|
||||
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.use(Languagedetector)
|
||||
.init({
|
||||
resources: {
|
||||
en: { translation: en },
|
||||
zhHk: { translation: hk },
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
export { i18n };
|
Reference in New Issue
Block a user