Files
meshtastic-web/src/core/translation.ts
T
2021-08-15 18:27:33 +10:00

22 lines
490 B
TypeScript

import i18n from 'i18next';
import detector from 'i18next-browser-languagedetector';
import { initReactI18next } from 'react-i18next';
import { en } from '../translations/en';
import { jp } from '../translations/jp';
import { pt } from '../translations/pt';
void i18n
.use(detector)
.use(initReactI18next)
.init({
fallbackLng: 'en',
resources: {
en: { translation: en },
jp: { translation: jp },
pt: { translation: pt },
},
});
export default i18n;