forked from rage/java-programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathi18n.js
More file actions
34 lines (31 loc) · 820 Bytes
/
i18n.js
File metadata and controls
34 lines (31 loc) · 820 Bytes
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
33
34
import i18n from "i18next"
import { initReactI18next } from "react-i18next"
import CourseSettings from "../course-settings"
import commonEN from "./locales/common/en"
import pointsBalloonEN from "./locales/pointsBalloon/en"
import userEN from "./locales/user/en"
import commonFI from "./locales/common/fi"
import pointsBalloonFI from "./locales/pointsBalloon/fi"
import userFI from "./locales/user/fi"
const resources = {
en: {
common: commonEN,
"points-balloon": pointsBalloonEN,
user: userEN,
},
fi: {
common: commonFI,
"points-balloon": pointsBalloonFI,
user: userFI,
},
}
i18n.use(initReactI18next).init({
resources,
ns: ["common", "user", "points-balloon"],
defaultNS: "common",
react: {
wait: true,
},
lng: CourseSettings.default.language,
})
export default i18n