jitsi-meet-electron/app/i18n/index.js

32 lines
911 B
JavaScript
Raw Normal View History

2020-06-26 13:05:42 +02:00
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import moment from 'moment';
const languages = {
2020-06-26 17:43:05 +02:00
de: { translation: require('./lang/de.json') },
en: { translation: require('./lang/en.json') },
2020-07-01 17:22:22 +02:00
es: { translation: require('./lang/es.json') },
2020-06-29 09:46:07 +02:00
fr: { translation: require('./lang/fr.json') },
2021-01-08 10:27:05 +01:00
gl: { translation: require('./lang/gl.json') },
2020-08-03 09:34:10 +02:00
hu: { translation: require('./lang/hu.json') },
2020-06-30 13:39:39 +02:00
it: { translation: require('./lang/it.json') },
ru: { translation: require('./lang/ru.json') }
2020-06-26 13:05:42 +02:00
};
const detectedLocale = window.jitsiNodeAPI.getLocale();
i18n
.use(initReactI18next)
.init({
resources: languages,
lng: detectedLocale,
fallbackLng: 'en',
interpolation: {
escapeValue: false // not needed for react as it escapes by default
}
});
moment.locale(detectedLocale);
export default i18n;