forked from Azure/pcs-remote-monitoring-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathi18n.js
32 lines (24 loc) · 699 Bytes
/
i18n.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import i18n from 'i18next';
import Backend from 'i18next-xhr-backend';
import LanguageDetector from 'i18next-browser-languagedetector';
import { reactI18nextModule } from 'react-i18next';
// Documentation for the i18n config can be found at the link below.
// https://www.i18next.com/configuration-options.html
i18n
.use(Backend)
.use(LanguageDetector)
.use(reactI18nextModule)
.init({
fallbackLng: 'en',
// Have a common namespace used around the full app
ns: ['translations'],
defaultNS: 'translations',
debug: false,
interpolation: {
escapeValue: false, // Not needed for react!!
},
react: {
wait: true
}
});
export default i18n;