mirror of
https://github.com/ihatenodejs/aidxnCC.git
synced 2025-04-24 13:55:57 +00:00
20 lines
424 B
TypeScript
20 lines
424 B
TypeScript
import i18n from 'i18next';
|
|
import { initReactI18next } from 'react-i18next';
|
|
import LanguageDetector from 'i18next-browser-languagedetector';
|
|
|
|
i18n
|
|
.use(LanguageDetector)
|
|
.use(initReactI18next)
|
|
.init({
|
|
resources: {
|
|
'en-US': {
|
|
translation: require('./public/locales/en-US.json')
|
|
}
|
|
},
|
|
fallbackLng: 'en-US',
|
|
interpolation: {
|
|
escapeValue: false
|
|
}
|
|
});
|
|
|
|
export default i18n;
|