-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathlocalize.js
47 lines (45 loc) · 1.1 KB
/
localize.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
const { newLocalizer } = require('@daisy/ace-localize');
const enJson = require("./locales/en.json");
const frJson = require("./locales/fr.json");
const pt_BRJson = require("./locales/pt_BR.json");
const esJson = require("./locales/es.json");
const daJson = require("./locales/da.json");
const jaJson = require("./locales/ja.json");
const deJson = require("./locales/de.json");
const zh_TWJson = require("./locales/zh_TW.json");
const localizer = newLocalizer({
en: {
name: "English",
default: true,
translation: enJson,
},
de: {
name: "Deutsch",
translation: deJson,
},
fr: {
name: "Français",
translation: frJson,
},
pt_BR: {
name: "Português do Brasil",
translation: pt_BRJson,
},
es: {
name: "Español",
translation: esJson,
},
da: {
name: "Dansk",
translation: daJson,
},
ja: {
name: "Japanese",
translation: jaJson,
},
zh_TW: {
name: "Traditional Chinese",
translation: zh_TWJson,
},
});
module.exports = { localizer };